How can functions in PHP return references?

In PHP, functions can return references using the `&` symbol before the function name in the return statement. This allows the function to return a reference to a variable rather than a copy of the variable. By returning a reference, any changes made to the variable within the function will also affect the original variable outside of the function.

function &returnReference(&$var) {
    $var++;
    return $var;
}

$num = 5;
$ref = &returnReference($num);
echo $num; // Output: 6
echo $ref; // Output: 6