3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $bool = false; $int = 0; echo 'is ', var_export($bool, true), ' == ', var_export($int, true), ' ? ', var_export($bool == $int), "\n"; $bools = (string)$bool; echo 'is ', var_export($bools, true), ' == ', var_export($bool, true), ' ? ', var_export($bools == $bool), "\n"; $ints = (str)$int; echo 'is ', var_export($ints, true), ' == ', var_export($int, true), ' ? ', var_export($ints == $int), "\n"; echo 'is ', var_export($bools, true), ' == ', var_export($ints, true), ' ? ', var_export($bools == $ints), "\n";
Output for 5.4.0 - 5.5.8
Parse error: syntax error, unexpected '$int' (T_VARIABLE) in /in/6K31F on line 9
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/6K31F on line 9
Process exited with code 255.