In the same context ( $a = $b + $c), they are converted into the number of the operator +, and the same applies to all the mathematical operators: +, *, -, /.
In another, it is just an empty variable (undefined variables are set to NULL), which are forced to a string using echo.
See http://php.net/manual/en/language.types.type-juggling.php
echo "Cast to int becomes: " . (integer) NULL;
echo "Cast to string becomes" . (string) NULL;
source
share