3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $t = array( 0, '0', '', null, false, array(), ); foreach ($t as $i => $v) { if ($v == NULL) { echo "$i : $v IS NULL"; } else { echo "$i : $v is not NULL"; } }
based on DFXQN
Output for 5.4.0 - 7.1.0
0 : 0 IS NULL1 : 0 is not NULL2 : IS NULL3 : IS NULL4 : IS NULL Notice: Array to string conversion in /in/A1ldD on line 15 5 : Array IS NULL
Output for 4.3.0 - 5.3.29
0 : 0 IS NULL1 : 0 is not NULL2 : IS NULL3 : IS NULL4 : IS NULL5 : Array IS NULL