3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $size = pow(2, 15); // 16 is just an example, could also be 15 or 17 $startTime = microtime(true); $array = array(); for ($key = 0, $maxKey = $size - 1; $key <= $maxKey; ++$key) { $array[$key] = 0; } $endTime = microtime(true); echo 'Inserting ', $size, ' good elements took ', $endTime - $startTime, ' seconds', "\n"; $startTime = microtime(true); $array = array(); for ($key = 0, $maxKey = ($size - 1) * $size; $key <= $maxKey; $key += $size) { $array[$key] = 0; } $endTime = microtime(true); echo 'Inserting ', $size, ' evil elements took ', $endTime - $startTime, ' seconds', "\n";
Output for 7.1.0
Inserting 32768 good elements took 0.00087594985961914 seconds Inserting 32768 evil elements took 1.0176320075989 seconds
Output for 7.0.14
Inserting 32768 good elements took 0.001025915145874 seconds Inserting 32768 evil elements took 1.0001718997955 seconds
Output for 7.0.6
Inserting 32768 good elements took 0.001288890838623 seconds Inserting 32768 evil elements took 1.183739900589 seconds
Output for 7.0.5
Inserting 32768 good elements took 0.00086092948913574 seconds Inserting 32768 evil elements took 1.1536359786987 seconds
Output for 7.0.4
Inserting 32768 good elements took 0.00059008598327637 seconds Inserting 32768 evil elements took 1.1547501087189 seconds
Output for 7.0.3
Inserting 32768 good elements took 0.0006718635559082 seconds Inserting 32768 evil elements took 1.1658809185028 seconds
Output for 7.0.2
Inserting 32768 good elements took 0.00069189071655273 seconds Inserting 32768 evil elements took 1.1571490764618 seconds
Output for 7.0.1
Inserting 32768 good elements took 0.00087118148803711 seconds Inserting 32768 evil elements took 1.1806640625 seconds
Output for 7.0.0
Inserting 32768 good elements took 0.00092387199401855 seconds Inserting 32768 evil elements took 1.1743378639221 seconds
Output for hhvm-3.12.0
Inserting 32768 good elements took 0.0045938491821289 seconds Inserting 32768 evil elements took 0.93406295776367 seconds
Output for hhvm-3.10.0
Inserting 32768 good elements took 0.0035610198974609 seconds Inserting 32768 evil elements took 1.2577137947083 seconds
Output for 5.6.28
Inserting 32768 good elements took 0.0063819885253906 seconds
Process exited with code 137.
Output for 5.6.21
Inserting 32768 good elements took 0.0047860145568848 seconds
Process exited with code 137.
Output for 5.6.20
Inserting 32768 good elements took 0.0065469741821289 seconds
Process exited with code 137.
Output for 5.6.19
Inserting 32768 good elements took 0.0053009986877441 seconds
Process exited with code 137.
Output for 5.6.18
Inserting 32768 good elements took 0.0039050579071045 seconds
Process exited with code 137.
Output for 5.6.17
Inserting 32768 good elements took 0.0045628547668457 seconds
Process exited with code 137.
Output for 5.6.16
Inserting 32768 good elements took 0.0061750411987305 seconds
Process exited with code 137.
Output for 5.6.15
Inserting 32768 good elements took 0.0041940212249756 seconds
Process exited with code 137.
Output for 5.6.14
Inserting 32768 good elements took 0.005389928817749 seconds
Process exited with code 137.
Output for 5.6.13
Inserting 32768 good elements took 0.0068089962005615 seconds
Process exited with code 137.
Output for 5.6.12
Inserting 32768 good elements took 0.0061159133911133 seconds
Process exited with code 137.
Output for 5.6.11
Inserting 32768 good elements took 0.0053830146789551 seconds
Process exited with code 137.
Output for 5.6.10
Inserting 32768 good elements took 0.0066468715667725 seconds
Process exited with code 137.
Output for 5.6.9
Inserting 32768 good elements took 0.0066239833831787 seconds
Process exited with code 137.
Output for 5.6.8
Inserting 32768 good elements took 0.0065321922302246 seconds
Process exited with code 137.
Output for 5.5.35
Inserting 32768 good elements took 0.004310131072998 seconds
Process exited with code 137.
Output for 5.5.34
Inserting 32768 good elements took 0.015298128128052 seconds
Process exited with code 137.
Output for 5.5.33
Inserting 32768 good elements took 0.0046148300170898 seconds
Process exited with code 137.
Output for 5.5.32
Inserting 32768 good elements took 0.0059959888458252 seconds
Process exited with code 137.
Output for 5.5.31
Inserting 32768 good elements took 0.012809038162231 seconds
Process exited with code 137.
Output for 5.5.30
Inserting 32768 good elements took 0.0067191123962402 seconds
Process exited with code 137.
Output for 5.5.29
Inserting 32768 good elements took 0.013237953186035 seconds
Process exited with code 137.
Output for 5.5.28
Inserting 32768 good elements took 0.01807689666748 seconds
Process exited with code 137.
Output for 5.5.27
Inserting 32768 good elements took 0.0059070587158203 seconds
Process exited with code 137.
Output for 5.5.26
Inserting 32768 good elements took 0.016757011413574 seconds
Process exited with code 137.
Output for 5.5.25
Inserting 32768 good elements took 0.010888814926147 seconds
Process exited with code 137.
Output for 5.5.24
Inserting 32768 good elements took 0.0066499710083008 seconds
Process exited with code 137.
Output for 5.4.45
Inserting 32768 good elements took 0.01730489730835 seconds
Process exited with code 137.
Output for 5.4.44
Inserting 32768 good elements took 0.0061209201812744 seconds
Process exited with code 137.
Output for 5.4.43
Inserting 32768 good elements took 0.0060980319976807 seconds
Process exited with code 137.
Output for 5.4.42
Inserting 32768 good elements took 0.030730009078979 seconds
Process exited with code 137.
Output for 5.4.41
Inserting 32768 good elements took 0.0041959285736084 seconds
Process exited with code 137.
Output for 5.4.40
Inserting 32768 good elements took 0.0060830116271973 seconds
Process exited with code 137.
Output for 5.4.39
Inserting 32768 good elements took 0.0049970149993896 seconds
Process exited with code 137.
Output for 5.4.38
Inserting 32768 good elements took 0.022953033447266 seconds
Process exited with code 137.
Output for 5.4.37
Inserting 32768 good elements took 0.0039432048797607 seconds
Process exited with code 137.
Output for 5.4.36
Inserting 32768 good elements took 0.011152029037476 seconds
Process exited with code 137.
Output for 5.4.35
Inserting 32768 good elements took 0.0068178176879883 seconds
Process exited with code 137.
Output for 5.4.34
Inserting 32768 good elements took 0.011522054672241 seconds
Process exited with code 137.
Output for 5.4.32
Inserting 32768 good elements took 0.0050020217895508 seconds
Process exited with code 137.
Output for 5.4.31
Inserting 32768 good elements took 0.011399984359741 seconds
Process exited with code 137.
Output for 5.4.30
Inserting 32768 good elements took 0.011985063552856 seconds
Process exited with code 137.
Output for 5.4.29
Inserting 32768 good elements took 0.011258840560913 seconds
Process exited with code 137.
Output for 5.4.28
Inserting 32768 good elements took 0.0042128562927246 seconds
Process exited with code 137.
Output for 5.4.27
Inserting 32768 good elements took 0.0040309429168701 seconds
Process exited with code 137.
Output for 5.4.26
Inserting 32768 good elements took 0.0064060688018799 seconds
Process exited with code 137.
Output for 5.4.25
Inserting 32768 good elements took 0.0060970783233643 seconds
Process exited with code 137.
Output for 5.4.24
Inserting 32768 good elements took 0.0065178871154785 seconds
Process exited with code 137.
Output for 5.4.23
Inserting 32768 good elements took 0.0038890838623047 seconds
Process exited with code 137.
Output for 5.4.22
Inserting 32768 good elements took 0.0046648979187012 seconds
Process exited with code 137.
Output for 5.4.21
Inserting 32768 good elements took 0.0069761276245117 seconds
Process exited with code 137.
Output for 5.4.20
Inserting 32768 good elements took 0.0058150291442871 seconds
Process exited with code 137.
Output for 5.4.19
Inserting 32768 good elements took 0.0058639049530029 seconds
Process exited with code 137.
Output for 5.4.18
Inserting 32768 good elements took 0.0066940784454346 seconds
Process exited with code 137.
Output for 5.4.17
Inserting 32768 good elements took 0.0083050727844238 seconds
Process exited with code 137.
Output for 5.4.16
Inserting 32768 good elements took 0.010462045669556 seconds
Process exited with code 137.
Output for 5.4.15
Inserting 32768 good elements took 0.013362884521484 seconds
Process exited with code 137.
Output for 5.4.14
Inserting 32768 good elements took 0.0038831233978271 seconds
Process exited with code 137.
Output for 5.4.13
Inserting 32768 good elements took 0.010684013366699 seconds
Process exited with code 137.
Output for 5.4.12
Inserting 32768 good elements took 0.020152807235718 seconds
Process exited with code 137.
Output for 5.4.11
Inserting 32768 good elements took 0.0039069652557373 seconds
Process exited with code 137.
Output for 5.4.10
Inserting 32768 good elements took 0.0088801383972168 seconds
Process exited with code 137.
Output for 5.4.9
Inserting 32768 good elements took 0.006321907043457 seconds
Process exited with code 137.
Output for 5.4.8
Inserting 32768 good elements took 0.0076589584350586 seconds
Process exited with code 137.
Output for 5.4.7
Inserting 32768 good elements took 0.013187885284424 seconds
Process exited with code 137.
Output for 5.4.6
Inserting 32768 good elements took 0.0056889057159424 seconds
Process exited with code 137.
Output for 5.4.5
Inserting 32768 good elements took 0.0053040981292725 seconds
Process exited with code 137.
Output for 5.4.4
Inserting 32768 good elements took 0.0063841342926025 seconds
Process exited with code 137.
Output for 5.4.3
Inserting 32768 good elements took 0.013437986373901 seconds
Process exited with code 137.
Output for 5.4.2
Inserting 32768 good elements took 0.0058908462524414 seconds
Process exited with code 137.
Output for 5.4.1
Inserting 32768 good elements took 0.0040850639343262 seconds
Process exited with code 137.
Output for 5.4.0
Inserting 32768 good elements took 0.0077788829803467 seconds
Process exited with code 137.
Output for 5.3.29
Inserting 32768 good elements took 0.0040371417999268 seconds
Process exited with code 137.
Output for 5.3.28
Inserting 32768 good elements took 0.0073142051696777 seconds
Process exited with code 137.
Output for 5.3.27
Inserting 32768 good elements took 0.0042340755462646 seconds
Process exited with code 137.
Output for 5.3.26
Inserting 32768 good elements took 0.0042550563812256 seconds
Process exited with code 137.
Output for 5.3.25
Inserting 32768 good elements took 0.011852025985718 seconds
Process exited with code 137.
Output for 5.3.24
Inserting 32768 good elements took 0.0041279792785645 seconds
Process exited with code 137.
Output for 5.3.23
Inserting 32768 good elements took 0.0066649913787842 seconds
Process exited with code 137.
Output for 5.3.22
Inserting 32768 good elements took 0.0090930461883545 seconds
Process exited with code 137.
Output for 5.3.21
Inserting 32768 good elements took 0.013626098632812 seconds
Process exited with code 137.
Output for 5.3.20
Inserting 32768 good elements took 0.011477947235107 seconds
Process exited with code 137.
Output for 5.3.19
Inserting 32768 good elements took 0.0098581314086914 seconds
Process exited with code 137.
Output for 5.3.18
Inserting 32768 good elements took 0.0062479972839355 seconds
Process exited with code 137.
Output for 5.3.17
Inserting 32768 good elements took 0.0062220096588135 seconds
Process exited with code 137.
Output for 5.3.16
Inserting 32768 good elements took 0.0041120052337646 seconds
Process exited with code 137.
Output for 5.3.15
Inserting 32768 good elements took 0.0066530704498291 seconds
Process exited with code 137.
Output for 5.3.14
Inserting 32768 good elements took 0.012028932571411 seconds
Process exited with code 137.
Output for 5.3.13
Inserting 32768 good elements took 0.0085818767547607 seconds
Process exited with code 137.
Output for 5.3.12
Inserting 32768 good elements took 0.022608995437622 seconds
Process exited with code 137.
Output for 5.3.11
Inserting 32768 good elements took 0.0047228336334229 seconds
Process exited with code 137.
Output for 5.3.10
Inserting 32768 good elements took 0.007904052734375 seconds
Process exited with code 137.
Output for 5.3.9
Inserting 32768 good elements took 0.0079910755157471 seconds
Process exited with code 137.
Output for 5.3.8
Inserting 32768 good elements took 0.0075409412384033 seconds
Process exited with code 137.
Output for 5.3.7
Inserting 32768 good elements took 0.0072600841522217 seconds
Process exited with code 137.
Output for 5.3.6
Inserting 32768 good elements took 0.0071868896484375 seconds
Process exited with code 137.
Output for 5.3.5
Inserting 32768 good elements took 0.0050280094146729 seconds
Process exited with code 137.
Output for 5.3.4
Inserting 32768 good elements took 0.01256799697876 seconds
Process exited with code 137.
Output for 5.3.3
Inserting 32768 good elements took 0.0062398910522461 seconds
Process exited with code 137.
Output for 5.3.2
Inserting 32768 good elements took 0.0080611705780029 seconds
Process exited with code 137.
Output for 5.3.1
Inserting 32768 good elements took 0.012294054031372 seconds
Process exited with code 137.
Output for 5.3.0
Inserting 32768 good elements took 0.004565954208374 seconds
Process exited with code 137.
Output for 5.2.17
Inserting 32768 good elements took 0.0088810920715332 seconds
Process exited with code 137.
Output for 5.2.16
Inserting 32768 good elements took 0.014236927032471 seconds
Process exited with code 137.
Output for 5.2.15
Inserting 32768 good elements took 0.0051310062408447 seconds
Process exited with code 137.
Output for 5.2.14
Inserting 32768 good elements took 0.0093920230865479 seconds
Process exited with code 137.
Output for 5.2.13
Inserting 32768 good elements took 0.0080549716949463 seconds
Process exited with code 137.
Output for 5.2.12
Inserting 32768 good elements took 0.013742923736572 seconds
Process exited with code 137.
Output for 5.2.11
Inserting 32768 good elements took 0.0062458515167236 seconds
Process exited with code 137.
Output for 5.2.10
Inserting 32768 good elements took 0.014060974121094 seconds
Process exited with code 137.
Output for 5.2.9
Inserting 32768 good elements took 0.006220817565918 seconds
Process exited with code 137.
Output for 5.2.8
Inserting 32768 good elements took 0.014144897460938 seconds
Process exited with code 137.
Output for 5.2.7
Inserting 32768 good elements took 0.0081241130828857 seconds
Process exited with code 137.
Output for 5.2.6
Inserting 32768 good elements took 0.013714075088501 seconds
Process exited with code 137.
Output for 5.2.5
Inserting 32768 good elements took 0.015760898590088 seconds
Process exited with code 137.
Output for 5.2.4
Inserting 32768 good elements took 0.006943941116333 seconds
Process exited with code 137.
Output for 5.2.3
Inserting 32768 good elements took 0.010209083557129 seconds
Process exited with code 137.
Output for 5.2.2
Inserting 32768 good elements took 0.016567945480347 seconds
Process exited with code 137.
Output for 5.2.1
Inserting 32768 good elements took 0.013398885726929 seconds
Process exited with code 137.
Output for 5.2.0
Inserting 32768 good elements took 0.006223201751709 seconds
Process exited with code 137.
Output for 5.1.6
Inserting 32768 good elements took 0.0083389282226562 seconds
Process exited with code 137.
Output for 5.1.5
Inserting 32768 good elements took 0.01720404624939 seconds
Process exited with code 137.
Output for 5.1.4
Inserting 32768 good elements took 0.0098981857299805 seconds
Process exited with code 137.
Output for 5.1.3
Inserting 32768 good elements took 0.017133951187134 seconds
Process exited with code 137.
Output for 5.1.2
Inserting 32768 good elements took 0.012835025787354 seconds
Process exited with code 137.
Output for 5.1.1
Inserting 32768 good elements took 0.010586023330688 seconds
Process exited with code 137.
Output for 5.1.0
Inserting 32768 good elements took 0.010632991790771 seconds
Process exited with code 137.
Output for 5.0.5
Inserting 32768 good elements took 0.015928030014038 seconds
Process exited with code 137.
Output for 5.0.4
Inserting 32768 good elements took 0.014142990112305 seconds
Process exited with code 137.
Output for 5.0.3
Inserting 32768 good elements took 0.0098598003387451 seconds
Process exited with code 137.
Output for 5.0.2
Inserting 32768 good elements took 0.012538909912109 seconds
Process exited with code 137.
Output for 5.0.1
Inserting 32768 good elements took 0.016782999038696 seconds
Process exited with code 137.
Output for 5.0.0
Inserting 32768 good elements took 0.0098330974578857 seconds
Process exited with code 137.
Output for 4.4.9
Inserting 32768 good elements took 0.022739 seconds
Process exited with code 137.
Output for 4.4.8
Inserting 32768 good elements took 0.009388 seconds
Process exited with code 137.
Output for 4.4.7
Inserting 32768 good elements took 0.010424 seconds
Process exited with code 137.
Output for 4.4.6
Inserting 32768 good elements took 0.013495 seconds
Process exited with code 137.
Output for 4.4.5
Inserting 32768 good elements took 0.03091 seconds
Process exited with code 137.
Output for 4.4.4
Inserting 32768 good elements took 0.036837 seconds
Process exited with code 137.
Output for 4.4.3
Inserting 32768 good elements took 0.038528 seconds
Process exited with code 137.
Output for 4.4.2
Inserting 32768 good elements took 0.017163 seconds
Process exited with code 137.
Output for 4.4.1
Inserting 32768 good elements took 0.034772 seconds
Process exited with code 137.
Output for 4.4.0
Inserting 32768 good elements took 0.021692 seconds
Process exited with code 137.
Output for 4.3.11
Inserting 32768 good elements took 0.0115 seconds
Process exited with code 137.
Output for 4.3.10
Inserting 32768 good elements took 0.048739 seconds
Process exited with code 137.
Output for 4.3.9
Inserting 32768 good elements took 0.008989 seconds
Process exited with code 137.
Output for 4.3.8
Inserting 32768 good elements took 0.016711 seconds
Process exited with code 137.
Output for 4.3.7
Inserting 32768 good elements took 0.02159 seconds
Process exited with code 137.
Output for 4.3.6
Inserting 32768 good elements took 0.021932 seconds
Process exited with code 137.
Output for 4.3.5
Inserting 32768 good elements took 0.020492 seconds
Process exited with code 137.
Output for 4.3.4
Inserting 32768 good elements took 0.019549 seconds
Process exited with code 137.
Output for 4.3.3
Inserting 32768 good elements took 0.020888 seconds
Process exited with code 137.
Output for 4.3.2
Inserting 32768 good elements took 0.013064 seconds
Process exited with code 137.
Output for 4.3.1
Inserting 32768 good elements took 0.012097 seconds
Process exited with code 137.
Output for 4.3.0
Inserting 32768 good elements took 0.015057 seconds
Process exited with code 137.