3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $count = 50000; $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.14 - 7.1.0
0.038 seconds
Output for 7.0.6
0.044 seconds
Output for 7.0.5
0.043 seconds
Output for 7.0.4
0.025 seconds
Output for 7.0.0 - 7.0.1, 7.0.3
0.035 seconds
Output for 7.0.2
0.027 seconds
Output for hhvm-3.12.0
0.061 seconds
Output for hhvm-3.10.0
0.080 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/WtaiM 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/WtaiM 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/WtaiM 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/WtaiM 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/WtaiM 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/WtaiM 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/WtaiM 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/WtaiM 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/WtaiM on line 13
Process exited with code 255.
Output for 5.2.0
0.175 seconds
Output for 5.1.6
0.149 seconds
Output for 5.1.0, 5.1.5
0.158 seconds
Output for 5.1.4
0.152 seconds
Output for 5.1.3
0.231 seconds
Output for 5.1.2
0.156 seconds
Output for 5.1.1
0.150 seconds
Output for 5.0.5
0.198 seconds
Output for 5.0.4
0.196 seconds
Output for 5.0.3
0.197 seconds
Output for 5.0.2
0.204 seconds
Output for 5.0.1
0.189 seconds
Output for 4.3.7, 5.0.0
0.203 seconds
Output for 4.4.9
0.195 seconds
Output for 4.4.8
0.190 seconds
Output for 4.4.7
-0.772 seconds
Output for 4.4.6
0.224 seconds
Output for 4.4.0, 4.4.5
-0.792 seconds
Output for 4.3.10, 4.4.4
0.201 seconds
Output for 4.4.3
0.259 seconds
Output for 4.4.2
0.213 seconds
Output for 4.4.1
0.209 seconds
Output for 4.3.11
0.255 seconds
Output for 4.3.9
-0.807 seconds
Output for 4.3.8
0.207 seconds
Output for 4.3.6
0.228 seconds
Output for 4.3.5
0.225 seconds
Output for 4.3.4
0.227 seconds
Output for 4.3.3
0.243 seconds
Output for 4.3.2
0.271 seconds
Output for 4.3.1
-0.761 seconds
Output for 4.3.0
0.205 seconds