What potential issues can arise when passing variables by reference in PHP?

When passing variables by reference in PHP, potential issues can arise if the original variable is modified unintentionally within a function. To avoid this, you can use the `&` symbol when passing the variable by reference and explicitly declare it as a reference within the function. This ensures that any changes made to the variable within the function will also affect the original variable outside of the function.

// Potential issue when passing variable by reference
function modifyValue(&$var) {
    $var = $var * 2;
}

$value = 5;
modifyValue($value);
echo $value; // Output: 5

// Fix by explicitly declaring variable as reference within the function
function modifyValue(&$var) {
    $var = $var * 2;
}

$value = 5;
modifyValue($value);
echo $value; // Output: 10