What is the significance of the return statement in PHP functions and how does it affect the function's execution?

The return statement in PHP functions is significant as it allows the function to return a value back to the calling code. Without a return statement, the function may execute its code but not provide any output or result. The return statement also allows for conditional or dynamic values to be returned based on the function's logic.

function calculateSum($num1, $num2) {
    $sum = $num1 + $num2;
    return $sum;
}

$result = calculateSum(5, 3);
echo "The sum is: " . $result;