3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo 'null == false? ', (null == false) ? 'yes' : 'no', '<br />'; echo 'null == 0?', (null == 0) ? 'yes' : 'no', '<br />'; echo 'null == "0"?', (null == "0") ? 'yes' : 'no', '<br />'; echo 'null == $undefined?', (null == $undefined) ? 'yes' : 'no', '<br />'; echo 'null == ""?', (null == "") ? 'yes' : 'no', '<br />'; echo 'false == 0?', (false == 0) ? 'yes' : 'no', '<br />'; echo 'false == "0"?', (false == "0") ? 'yes' : 'no', '<br />'; echo 'false == $undefined?', (false == $undefined) ? 'yes' : 'no', '<br />'; echo 'false == ""?', (false == "") ? 'yes' : 'no', '<br />'; echo '0 == "0"?', (0 == "0") ? 'yes' : 'no', '<br />'; echo '0 == $undefined?', (0 == $undefined) ? 'yes' : 'no', '<br />'; echo '0 == ""?', (0 == "") ? 'yes' : 'no', '<br />'; echo '"0" == $undefined?', ("0" == $undefined) ? 'yes' : 'no', '<br />'; echo '"0" == ""?', ("0" == "") ? 'yes' : 'no', '<br />'; echo '$undefined == ""?', ($undefined == "") ? 'yes' : 'no', '<br />';
Output for 5.0.4 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
null == false? yes<br />null == 0?yes<br />null == "0"?no<br />null == $undefined? Notice: Undefined variable: undefined in /in/5Y6uX on line 6 yes<br />null == ""?yes<br />false == 0?yes<br />false == "0"?yes<br />false == $undefined? Notice: Undefined variable: undefined in /in/5Y6uX on line 11 yes<br />false == ""?yes<br />0 == "0"?yes<br />0 == $undefined? Notice: Undefined variable: undefined in /in/5Y6uX on line 15 yes<br />0 == ""?yes<br />"0" == $undefined? Notice: Undefined variable: undefined in /in/5Y6uX on line 18 no<br />"0" == ""?no<br />$undefined == ""? Notice: Undefined variable: undefined in /in/5Y6uX on line 21 yes<br />
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.0.3
null == false? yes<br />null == 0?yes<br />null == "0"?no<br />null == $undefined? Notice: Undefined variable: undefined in /in/5Y6uX on line 6 yes<br />null == ""?yes<br />false == 0?yes<br />false == "0"?yes<br />false == $undefined? Notice: Undefined variable: undefined in /in/5Y6uX on line 11 yes<br />false == ""?yes<br />0 == "0"?yes<br />0 == $undefined? Notice: Undefined variable: undefined in /in/5Y6uX on line 15 yes<br />0 == ""?yes<br />"0" == $undefined? Notice: Undefined variable: undefined in /in/5Y6uX on line 18 no<br />"0" == ""?no<br />$undefined == ""? Notice: Undefined variable: undefined in /in/5Y6uX on line 21 yes<br />