3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php define('KEYS', 99999); $a = new ArrayObject(); function fill(&$arr) { for ($i = 1; $i <= KEYS; $i++) { $arr['key-' . $i] = $i; } } function read_key(&$arr) { for ($i = 1; $i <= KEYS; $i++) { $v = $arr['key-' . $i]; } } function for_each(&$arr) { foreach ($arr as $key => $value) { $v = $value; } } fill($a); read_key($a); for_each($a);

Abusive script

This script was stopped while abusing our resources

Output for 5.3.0 - 5.4.45