3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('KEYS', 1000); $a = array(); function fill(&$arr) { for ($i = 1; $i <= 10; $i++) { $arr['key-' . $i] = $i; } } function read_key(&$arr) { for ($i = 1; $i <= KEYS; $i++) { for ($j = 1; $j <= 10; $i++) { //$v = $arr['key-' . $i]; } } } function for_each(&$arr) { for ($i = 1; $i <= 1000; $i++) { foreach ($arr as $key => $value) { //$v = $value; } } } fill($a); read_key($a); //for_each($a);
Output for 4.3.0 - 5.0.5, 5.1.1 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0

Process exited with code 137.
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/poNKi on line 32
Process exited with code 255.