3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('KEYS', 1000); $a = ArrayObject(); 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 7.0.0 - 7.1.0
Fatal error: Uncaught Error: Call to undefined function ArrayObject() in /in/K44q4:5 Stack trace: #0 {main} thrown in /in/K44q4 on line 5
Process exited with code 255.
Output for 5.0.0 - 5.6.28
Fatal error: Call to undefined function ArrayObject() in /in/K44q4 on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: arrayobject() in /in/K44q4 on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: arrayobject() in /in/K44q4 on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: arrayobject() in /in/K44q4 on line 5