3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = array(1, 2, 3, 4, 5); $len=$x.length; echo "array[$len]"; foreach($x as $key=>$int) echo "[$key] => $int"; unset($x[3]); $len=$x.length; echo "array[$len]"; foreach($x as $key=>$int) echo "[$key] => $int"; ?>
Output for 5.4.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
Notice: Use of undefined constant length - assumed 'length' in /in/kn6Sn on line 3 Notice: Array to string conversion in /in/kn6Sn on line 3 array[Arraylength][0] => 1[1] => 2[2] => 3[3] => 4[4] => 5 Notice: Use of undefined constant length - assumed 'length' in /in/kn6Sn on line 8 Notice: Array to string conversion in /in/kn6Sn on line 8 array[Arraylength][0] => 1[1] => 2[2] => 3[4] => 5
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.0 - 5.3.29
Notice: Use of undefined constant length - assumed 'length' in /in/kn6Sn on line 3 array[Arraylength][0] => 1[1] => 2[2] => 3[3] => 4[4] => 5 Notice: Use of undefined constant length - assumed 'length' in /in/kn6Sn on line 8 array[Arraylength][0] => 1[1] => 2[2] => 3[4] => 5