3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo 'null == false? ', (null == false) ? 'yes' : 'no', "\n"; echo 'null == 0? ', (null == 0) ? 'yes' : 'no', "\n"; echo 'null == "0"? ', (null == "0") ? 'yes' : 'no', "\n"; echo 'null == $undefined? ', (null == $undefined) ? 'yes' : 'no', "\n"; echo 'null == ""? ', (null == "") ? 'yes' : 'no', "\n"; echo 'false == 0? ', (false == 0) ? 'yes' : 'no', "\n"; echo 'false == "0"?', (false == "0") ? 'yes' : 'no', "\n"; echo 'false == $undefined? ', (false == $undefined) ? 'yes' : 'no', "\n"; echo 'false == ""? ', (false == "") ? 'yes' : 'no', "\n"; echo '0 == "0"? ', (0 == "0") ? 'yes' : 'no', "\n"; echo '0 == $undefined? ', (0 == $undefined) ? 'yes' : 'no', "\n"; echo '0 == ""? ', (0 == "") ? 'yes' : 'no', "\n"; echo '"0" == $undefined? ', ("0" == $undefined) ? 'yes' : 'no', "\n"; echo '"0" == ""? ', ("0" == "") ? 'yes' : 'no', "\n"; echo '$undefined == ""? ', ($undefined == "") ? 'yes' : 'no', "\n";
Output for 5.5.0 - 7.1.0
null == false? yes null == 0? yes null == "0"? no null == $undefined? Notice: Undefined variable: undefined in /in/SZhsg on line 6 yes null == ""? yes false == 0? yes false == "0"?yes false == $undefined? Notice: Undefined variable: undefined in /in/SZhsg on line 11 yes false == ""? yes 0 == "0"? yes 0 == $undefined? Notice: Undefined variable: undefined in /in/SZhsg on line 15 yes 0 == ""? yes "0" == $undefined? Notice: Undefined variable: undefined in /in/SZhsg on line 18 no "0" == ""? no $undefined == ""? Notice: Undefined variable: undefined in /in/SZhsg on line 21 yes
Output for 4.3.0 - 5.4.45
null == false? yes null == 0? yes null == "0"? no null == $undefined? yes null == ""? yes false == 0? yes false == "0"?yes false == $undefined? yes false == ""? yes 0 == "0"? yes 0 == $undefined? yes 0 == ""? yes "0" == $undefined? no "0" == ""? no $undefined == ""? yes