3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x =array( array(), "", 0, false, null ); foreach ($x as $val) { if (!$val) { print "The condition is unexpectedly true, though it's not a boolean and was magically converted\n"; } }
based on AV86F
Output for 5.3.23 - 7.3.1
The condition is unexpectedly true, though it's not a boolean and was magically converted The condition is unexpectedly true, though it's not a boolean and was magically converted The condition is unexpectedly true, though it's not a boolean and was magically converted The condition is unexpectedly true, though it's not a boolean and was magically converted The condition is unexpectedly true, though it's not a boolean and was magically converted