3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $max = 1000; $arr = array_fill(0, $max, 1); $mem = memory_get_usage();x $count = 0; foreach ($arr as $key => &$val) { $count ++; $arr[$max+1] = 9999; } echo $count.' === '.(memory_get_usage()-$mem);
Output for 5.4.0 - 5.4.28
Parse error: syntax error, unexpected '$count' (T_VARIABLE) in /in/Vnv0C on line 6
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/Vnv0C on line 6
Process exited with code 255.