3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $count = 200000; $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 7.0.0 - 7.1.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/SEc4i on line 20
Process exited with code 255.
Output for hhvm-3.12.0
0.181 seconds
Output for hhvm-3.10.0
0.247 seconds
Output for 5.5.24 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/SEc4i on line 21
Process exited with code 255.
Output for 5.4.10 - 5.4.45
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/SEc4i 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/SEc4i on line 34
Process exited with code 255.
Output for 5.3.11 - 5.3.29
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/SEc4i 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/SEc4i on line 17
Process exited with code 255.
Output for 5.2.1, 5.2.10 - 5.2.17
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 24 bytes) in /in/SEc4i on line 16
Process exited with code 255.
Output for 5.2.7 - 5.2.9
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 8 bytes) in /in/SEc4i on line 15
Process exited with code 255.
Output for 5.2.3 - 5.2.6
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 89 bytes) in /in/SEc4i on line 14
Process exited with code 255.
Output for 5.2.2
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 89 bytes) in /in/SEc4i on line 13
Process exited with code 255.
Output for 5.2.0
1.099 seconds
Output for 5.1.6
1.148 seconds
Output for 5.1.5
0.770 seconds
Output for 5.1.4
0.948 seconds
Output for 5.1.3
0.963 seconds
Output for 5.1.2
0.840 seconds
Output for 5.1.1
0.925 seconds
Output for 5.1.0
0.930 seconds
Output for 5.0.5
1.357 seconds
Output for 5.0.4
1.073 seconds
Output for 5.0.3
1.275 seconds
Output for 5.0.2
1.153 seconds
Output for 5.0.1
1.266 seconds
Output for 5.0.0
1.053 seconds
Output for 4.4.9
0.146 seconds
Output for 4.4.8
0.240 seconds
Output for 4.4.7
0.137 seconds
Output for 4.4.6
0.348 seconds
Output for 4.4.5
0.172 seconds
Output for 4.4.4
0.400 seconds
Output for 4.4.3
0.237 seconds
Output for 4.4.2
0.589 seconds
Output for 4.4.1
-0.366 seconds
Output for 4.4.0
-0.563 seconds
Output for 4.3.11
-0.134 seconds
Output for 4.3.10
-0.657 seconds
Output for 4.3.9
0.292 seconds
Output for 4.3.8
0.109 seconds
Output for 4.3.7
0.097 seconds
Output for 4.3.6
-0.721 seconds
Output for 4.3.5
0.286 seconds
Output for 4.3.4
0.168 seconds
Output for 4.3.3
-0.412 seconds
Output for 4.3.2
0.101 seconds
Output for 4.3.1
0.044 seconds
Output for 4.3.0
0.511 seconds