What is the potential issue with passing variables by reference in PHP?

Passing variables by reference in PHP can lead to unexpected behavior and make the code harder to debug. To solve this issue, it is recommended to avoid passing variables by reference unless absolutely necessary. Instead, consider passing variables by value or using return statements to handle the data flow.

function modifyValue(&$value) {
    $value += 10;
}

$number = 5;
modifyValue($number);
echo $number; // Output will be 15