3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print('TRUE == "foo" : '); var_dump(TRUE == "foo"); print(' "foo" == 0 : '); var_dump("foo" == 0); print(' TRUE == 0 : '); var_dump(TRUE == 0); var_dump((TRUE == "foo") == 0); var_dump(TRUE == ("foo" == 0));
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
TRUE == "foo" : bool(true) "foo" == 0 : bool(true) TRUE == 0 : bool(false) bool(false) bool(true)