Not. PHP is required, so the right-hand side of assignment expressions is evaluated, and the result is stored "on the left-hand side" (in the simple and almost universal case, the variable named on the left-hand side).
$a = $b; // Find the value of $b, and copy it into the value of $a $a = 5 + 2; // Evaulate 5 + 2 to get 7, and store this in $a $a = funcName(); // Evaluate funcName, which is equivalent to executing the code and obtaining the return value. Copy this value into $a
It gets a little trickier if you assign by reference ($ a = & $ b), but this time we donβt need to worry.
Adam wright
source share