3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $count = 100000; $time = microtime(true); $items = array(); for ($i = 0; $i < $count; $i++) { $item = array(); $item['some_simple_key_0'] = 'value 0'; $item['some_simple_key_1'] = 'value 1'; $item['some_simple_key_2'] = 'value 2'; $item['some_simple_key_3'] = 'value 3'; $item['some_simple_key_4'] = 'value 4'; $item['some_simple_key_5'] = 'value 5'; $item['some_simple_key_6'] = 'value 6'; $item['some_simple_key_7'] = 'value 7'; $item['some_simple_key_8'] = 'value 8'; $item['some_simple_key_9'] = 'value 9'; $val = $item['some_simple_key_0']; $val = $item['some_simple_key_1']; $val = $item['some_simple_key_2']; $val = $item['some_simple_key_3']; $val = $item['some_simple_key_4']; $val = $item['some_simple_key_5']; $val = $item['some_simple_key_6']; $val = $item['some_simple_key_7']; $val = $item['some_simple_key_8']; $val = $item['some_simple_key_9']; $items[] = $item; } $spentTime = microtime(true) - $time; echo number_format($spentTime, 3) . ' seconds';
Output for 5.4.10 - 5.4.30
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/9GEU9 on line 19
Process exited with code 255.
Output for 5.4.0 - 5.4.9
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/9GEU9 on line 34
Process exited with code 255.
Output for 5.3.11 - 5.3.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/9GEU9 on line 15
Process exited with code 255.
Output for 5.3.0 - 5.3.10
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 89 bytes) in /in/9GEU9 on line 17
Process exited with code 255.