3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $size = pow(2, 14); // 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 16384 good elements took 0.00044107437133789 seconds Inserting 16384 evil elements took 0.3016722202301 seconds
Output for 7.0.14
Inserting 16384 good elements took 0.00049495697021484 seconds Inserting 16384 evil elements took -0.21688103675842 seconds
Output for 7.0.6
Inserting 16384 good elements took 0.00064587593078613 seconds Inserting 16384 evil elements took 0.31534600257874 seconds
Output for 7.0.5
Inserting 16384 good elements took 0.00041604042053223 seconds Inserting 16384 evil elements took 0.28536701202393 seconds
Output for 7.0.4
Inserting 16384 good elements took 0.0003049373626709 seconds Inserting 16384 evil elements took 0.29512596130371 seconds
Output for 7.0.3
Inserting 16384 good elements took 0.00043106079101562 seconds Inserting 16384 evil elements took 0.31389403343201 seconds
Output for 7.0.2
Inserting 16384 good elements took 0.0003960132598877 seconds Inserting 16384 evil elements took 0.30598402023315 seconds
Output for 7.0.1
Inserting 16384 good elements took 0.00032520294189453 seconds Inserting 16384 evil elements took 0.2849280834198 seconds
Output for 7.0.0
Inserting 16384 good elements took 0.00036883354187012 seconds Inserting 16384 evil elements took 0.29971194267273 seconds
Output for 5.6.28
Inserting 16384 good elements took 0.0044541358947754 seconds Inserting 16384 evil elements took 1.2492318153381 seconds
Output for 5.6.21
Inserting 16384 good elements took 0.0034239292144775 seconds Inserting 16384 evil elements took 1.5587468147278 seconds
Output for 5.6.20
Inserting 16384 good elements took 0.0021359920501709 seconds Inserting 16384 evil elements took 1.5307939052582 seconds
Output for 5.6.19
Inserting 16384 good elements took 0.0026049613952637 seconds Inserting 16384 evil elements took 1.4451489448547 seconds
Output for 5.6.18
Inserting 16384 good elements took 0.0023760795593262 seconds Inserting 16384 evil elements took 1.5233919620514 seconds
Output for 5.6.17
Inserting 16384 good elements took 0.0027790069580078 seconds Inserting 16384 evil elements took 1.5523109436035 seconds
Output for 5.6.16
Inserting 16384 good elements took 0.0019209384918213 seconds Inserting 16384 evil elements took 1.3779408931732 seconds
Output for 5.6.15
Inserting 16384 good elements took 0.0031509399414062 seconds Inserting 16384 evil elements took 1.563738822937 seconds
Output for 5.6.14
Inserting 16384 good elements took 0.0031499862670898 seconds Inserting 16384 evil elements took 1.4146108627319 seconds
Output for 5.6.13
Inserting 16384 good elements took 0.0021209716796875 seconds Inserting 16384 evil elements took 1.4725091457367 seconds
Output for 5.6.12
Inserting 16384 good elements took 0.0020780563354492 seconds Inserting 16384 evil elements took 1.5088820457458 seconds
Output for 5.6.11
Inserting 16384 good elements took 0.0032210350036621 seconds Inserting 16384 evil elements took 1.5393950939178 seconds
Output for 5.6.10
Inserting 16384 good elements took 0.0026390552520752 seconds Inserting 16384 evil elements took 1.5552740097046 seconds
Output for 5.6.9
Inserting 16384 good elements took 0.0032269954681396 seconds Inserting 16384 evil elements took 1.506364107132 seconds
Output for 5.6.8
Inserting 16384 good elements took 0.0025110244750977 seconds Inserting 16384 evil elements took 1.5567119121552 seconds
Output for 5.5.35
Inserting 16384 good elements took 0.0031421184539795 seconds Inserting 16384 evil elements took 1.4355590343475 seconds
Output for 5.5.34
Inserting 16384 good elements took 0.0021789073944092 seconds Inserting 16384 evil elements took 1.4490449428558 seconds
Output for 5.5.33
Inserting 16384 good elements took 0.0031008720397949 seconds Inserting 16384 evil elements took 1.5611319541931 seconds
Output for 5.5.32
Inserting 16384 good elements took 0.0025420188903809 seconds Inserting 16384 evil elements took 1.3926839828491 seconds
Output for 5.5.31
Inserting 16384 good elements took 0.0026841163635254 seconds Inserting 16384 evil elements took 1.5309348106384 seconds
Output for 5.5.30
Inserting 16384 good elements took 0.003371000289917 seconds Inserting 16384 evil elements took 1.5834610462189 seconds
Output for 5.5.29
Inserting 16384 good elements took 0.0033011436462402 seconds Inserting 16384 evil elements took 1.5008478164673 seconds
Output for 5.5.28
Inserting 16384 good elements took 0.0021188259124756 seconds Inserting 16384 evil elements took 1.4713230133057 seconds
Output for 5.5.27
Inserting 16384 good elements took 0.0021729469299316 seconds Inserting 16384 evil elements took 1.5094661712646 seconds
Output for 5.5.26
Inserting 16384 good elements took 0.0032780170440674 seconds Inserting 16384 evil elements took 1.578430891037 seconds
Output for 5.5.25
Inserting 16384 good elements took 0.0033400058746338 seconds Inserting 16384 evil elements took 1.5728979110718 seconds
Output for 5.5.24
Inserting 16384 good elements took 0.0032048225402832 seconds Inserting 16384 evil elements took 1.4407680034637 seconds
Output for 5.4.45
Inserting 16384 good elements took 0.0037240982055664 seconds Inserting 16384 evil elements took 1.9864721298218 seconds
Output for 5.4.44
Inserting 16384 good elements took 0.0033409595489502 seconds Inserting 16384 evil elements took 2.0294480323792 seconds
Output for 5.4.43
Inserting 16384 good elements took 0.0034210681915283 seconds Inserting 16384 evil elements took 2.2445638179779 seconds
Output for 5.4.42
Inserting 16384 good elements took 0.0034899711608887 seconds Inserting 16384 evil elements took 2.1477530002594 seconds
Output for 5.4.41
Inserting 16384 good elements took 0.0033168792724609 seconds Inserting 16384 evil elements took 2.0904998779297 seconds
Output for 5.4.40
Inserting 16384 good elements took 0.0032999515533447 seconds Inserting 16384 evil elements took 2.0281739234924 seconds
Output for 5.4.39
Inserting 16384 good elements took 0.0035390853881836 seconds Inserting 16384 evil elements took 2.1851189136505 seconds
Output for 5.4.38
Inserting 16384 good elements took 0.0035538673400879 seconds Inserting 16384 evil elements took 2.2330529689789 seconds
Output for 5.4.37
Inserting 16384 good elements took 0.0034120082855225 seconds Inserting 16384 evil elements took 2.2563090324402 seconds
Output for 5.4.36
Inserting 16384 good elements took 0.0037119388580322 seconds Inserting 16384 evil elements took 2.2561950683594 seconds
Output for 5.4.35
Inserting 16384 good elements took 0.0058491230010986 seconds Inserting 16384 evil elements took 2.2697720527649 seconds
Output for 5.4.34
Inserting 16384 good elements took 0.0037989616394043 seconds Inserting 16384 evil elements took 2.1677460670471 seconds
Output for 5.4.32
Inserting 16384 good elements took 0.0019919872283936 seconds Inserting 16384 evil elements took 1.4029779434204 seconds
Output for 5.4.31
Inserting 16384 good elements took 0.0020639896392822 seconds Inserting 16384 evil elements took 1.3967428207397 seconds
Output for 5.4.30
Inserting 16384 good elements took 0.0020058155059814 seconds Inserting 16384 evil elements took 1.3893492221832 seconds
Output for 5.4.29
Inserting 16384 good elements took 0.0040581226348877 seconds Inserting 16384 evil elements took 1.4644060134888 seconds
Output for 5.4.28
Inserting 16384 good elements took 0.0030179023742676 seconds Inserting 16384 evil elements took 1.4674980640411 seconds
Output for 5.4.27
Inserting 16384 good elements took 0.0021960735321045 seconds Inserting 16384 evil elements took 1.4760820865631 seconds
Output for 5.4.26
Inserting 16384 good elements took 0.0023698806762695 seconds Inserting 16384 evil elements took 1.441440820694 seconds
Output for 5.4.25
Inserting 16384 good elements took 0.0036590099334717 seconds Inserting 16384 evil elements took 1.5328731536865 seconds
Output for 5.4.24
Inserting 16384 good elements took 0.002094030380249 seconds Inserting 16384 evil elements took 1.4241778850555 seconds
Output for 5.4.23
Inserting 16384 good elements took 0.0023419857025146 seconds Inserting 16384 evil elements took 1.4721179008484 seconds
Output for 5.4.22
Inserting 16384 good elements took 0.0036990642547607 seconds Inserting 16384 evil elements took 1.4871990680695 seconds
Output for 5.4.21
Inserting 16384 good elements took 0.0023269653320312 seconds Inserting 16384 evil elements took 1.4969561100006 seconds
Output for 5.4.20
Inserting 16384 good elements took 0.0021200180053711 seconds Inserting 16384 evil elements took 1.4641749858856 seconds
Output for 5.4.19
Inserting 16384 good elements took 0.0025539398193359 seconds Inserting 16384 evil elements took 1.4760301113129 seconds
Output for 5.4.18
Inserting 16384 good elements took 0.0023601055145264 seconds Inserting 16384 evil elements took 1.4110510349274 seconds
Output for 5.4.17
Inserting 16384 good elements took 0.0021040439605713 seconds Inserting 16384 evil elements took 1.460969209671 seconds
Output for 5.4.16
Inserting 16384 good elements took 0.0022280216217041 seconds Inserting 16384 evil elements took 1.4784610271454 seconds
Output for 5.4.15
Inserting 16384 good elements took 0.0029690265655518 seconds Inserting 16384 evil elements took 1.6711750030518 seconds
Output for 5.4.14
Inserting 16384 good elements took 0.0041389465332031 seconds Inserting 16384 evil elements took 1.5264999866486 seconds
Output for 5.4.13
Inserting 16384 good elements took 0.0028848648071289 seconds Inserting 16384 evil elements took 1.5172278881073 seconds
Output for 5.4.12
Inserting 16384 good elements took 0.0022711753845215 seconds Inserting 16384 evil elements took 1.4651679992676 seconds
Output for 5.4.11
Inserting 16384 good elements took 0.002249002456665 seconds Inserting 16384 evil elements took 1.4652140140533 seconds
Output for 5.4.10
Inserting 16384 good elements took 0.0026299953460693 seconds Inserting 16384 evil elements took 1.4467470645905 seconds
Output for 5.4.9
Inserting 16384 good elements took 0.002310037612915 seconds Inserting 16384 evil elements took 1.4116358757019 seconds
Output for 5.4.8
Inserting 16384 good elements took 0.0026741027832031 seconds Inserting 16384 evil elements took 1.4180629253387 seconds
Output for 5.4.7
Inserting 16384 good elements took 0.0022411346435547 seconds Inserting 16384 evil elements took 1.4376800060272 seconds
Output for 5.4.6
Inserting 16384 good elements took 0.0024571418762207 seconds Inserting 16384 evil elements took 1.4166178703308 seconds
Output for 5.4.5
Inserting 16384 good elements took 0.0021650791168213 seconds Inserting 16384 evil elements took 1.4568140506744 seconds
Output for 5.4.4
Inserting 16384 good elements took 0.0025439262390137 seconds Inserting 16384 evil elements took 1.466903924942 seconds
Output for 5.4.3
Inserting 16384 good elements took 0.002277135848999 seconds Inserting 16384 evil elements took 1.4607949256897 seconds
Output for 5.4.2
Inserting 16384 good elements took 0.0041720867156982 seconds Inserting 16384 evil elements took 1.5261518955231 seconds
Output for 5.4.1
Inserting 16384 good elements took 0.0045788288116455 seconds Inserting 16384 evil elements took 1.5358550548553 seconds
Output for 5.4.0
Inserting 16384 good elements took 0.0025410652160645 seconds Inserting 16384 evil elements took 1.4677710533142 seconds
Output for 5.3.29
Inserting 16384 good elements took 0.0021898746490479 seconds Inserting 16384 evil elements took 1.3670618534088 seconds
Output for 5.3.28
Inserting 16384 good elements took 0.0042710304260254 seconds Inserting 16384 evil elements took 1.4502050876617 seconds
Output for 5.3.27
Inserting 16384 good elements took 0.0038840770721436 seconds Inserting 16384 evil elements took 1.4984860420227 seconds
Output for 5.3.26
Inserting 16384 good elements took 0.0030910968780518 seconds Inserting 16384 evil elements took 1.5452179908752 seconds
Output for 5.3.25
Inserting 16384 good elements took 0.0025761127471924 seconds Inserting 16384 evil elements took 1.4207420349121 seconds
Output for 5.3.24
Inserting 16384 good elements took 0.0024480819702148 seconds Inserting 16384 evil elements took 1.54354596138 seconds
Output for 5.3.23
Inserting 16384 good elements took 0.0037581920623779 seconds Inserting 16384 evil elements took 1.536041021347 seconds
Output for 5.3.22
Inserting 16384 good elements took 0.0039918422698975 seconds Inserting 16384 evil elements took 1.5201930999756 seconds
Output for 5.3.21
Inserting 16384 good elements took 0.002816915512085 seconds Inserting 16384 evil elements took 1.474081993103 seconds
Output for 5.3.20
Inserting 16384 good elements took 0.0025238990783691 seconds Inserting 16384 evil elements took 1.4669299125671 seconds
Output for 5.3.19
Inserting 16384 good elements took 0.0025808811187744 seconds Inserting 16384 evil elements took 1.3958959579468 seconds
Output for 5.3.18
Inserting 16384 good elements took 0.0025520324707031 seconds Inserting 16384 evil elements took 1.406341791153 seconds
Output for 5.3.17
Inserting 16384 good elements took 0.0025730133056641 seconds Inserting 16384 evil elements took 1.4623010158539 seconds
Output for 5.3.16
Inserting 16384 good elements took 0.0040290355682373 seconds Inserting 16384 evil elements took 1.3933119773865 seconds
Output for 5.3.15
Inserting 16384 good elements took 0.0029041767120361 seconds Inserting 16384 evil elements took 1.4900939464569 seconds
Output for 5.3.14
Inserting 16384 good elements took 0.0027399063110352 seconds Inserting 16384 evil elements took 1.5074880123138 seconds
Output for 5.3.13
Inserting 16384 good elements took 0.0043420791625977 seconds Inserting 16384 evil elements took 1.8863308429718 seconds
Output for 5.3.12
Inserting 16384 good elements took 0.0040149688720703 seconds Inserting 16384 evil elements took 1.5833218097687 seconds
Output for 5.3.11
Inserting 16384 good elements took 0.0028760433197021 seconds Inserting 16384 evil elements took 1.4593698978424 seconds
Output for 5.3.10
Inserting 16384 good elements took 0.0023279190063477 seconds Inserting 16384 evil elements took 1.5816829204559 seconds
Output for 5.3.9
Inserting 16384 good elements took 0.0025520324707031 seconds Inserting 16384 evil elements took 1.5731580257416 seconds
Output for 5.3.8
Inserting 16384 good elements took 0.0043649673461914 seconds Inserting 16384 evil elements took 1.4961979389191 seconds
Output for 5.3.7
Inserting 16384 good elements took 0.0038611888885498 seconds Inserting 16384 evil elements took 1.5750329494476 seconds
Output for 5.3.6
Inserting 16384 good elements took 0.004148006439209 seconds Inserting 16384 evil elements took 1.542405128479 seconds
Output for 5.3.5
Inserting 16384 good elements took 0.0024290084838867 seconds Inserting 16384 evil elements took 1.4035699367523 seconds
Output for 5.3.4
Inserting 16384 good elements took 0.0041799545288086 seconds Inserting 16384 evil elements took 1.4510850906372 seconds
Output for 5.3.3
Inserting 16384 good elements took 0.0028798580169678 seconds Inserting 16384 evil elements took 1.4633679389954 seconds
Output for 5.3.2
Inserting 16384 good elements took 0.0026321411132812 seconds Inserting 16384 evil elements took 1.4083158969879 seconds
Output for 5.3.1
Inserting 16384 good elements took 0.0039560794830322 seconds Inserting 16384 evil elements took 1.440425157547 seconds
Output for 5.3.0
Inserting 16384 good elements took 0.0038712024688721 seconds Inserting 16384 evil elements took 1.3983578681946 seconds
Output for 5.2.17
Inserting 16384 good elements took 0.0043389797210693 seconds Inserting 16384 evil elements took 1.3633267879486 seconds
Output for 5.2.16
Inserting 16384 good elements took 0.0046100616455078 seconds Inserting 16384 evil elements took 1.3435599803925 seconds
Output for 5.2.15
Inserting 16384 good elements took 0.0030670166015625 seconds Inserting 16384 evil elements took 1.3326559066772 seconds
Output for 5.2.14
Inserting 16384 good elements took 0.0028390884399414 seconds Inserting 16384 evil elements took 1.3551540374756 seconds
Output for 5.2.13
Inserting 16384 good elements took 0.0027611255645752 seconds Inserting 16384 evil elements took 1.3962800502777 seconds
Output for 5.2.12
Inserting 16384 good elements took 0.0036301612854004 seconds Inserting 16384 evil elements took 1.345192193985 seconds
Output for 5.2.11
Inserting 16384 good elements took 0.003108024597168 seconds Inserting 16384 evil elements took 1.3193321228027 seconds
Output for 5.2.10
Inserting 16384 good elements took 0.0049309730529785 seconds Inserting 16384 evil elements took 1.3527340888977 seconds
Output for 5.2.9
Inserting 16384 good elements took 0.0032570362091064 seconds Inserting 16384 evil elements took 1.377424955368 seconds
Output for 5.2.8
Inserting 16384 good elements took 0.0039370059967041 seconds Inserting 16384 evil elements took 1.3110499382019 seconds
Output for 5.2.7
Inserting 16384 good elements took 0.0036280155181885 seconds Inserting 16384 evil elements took 1.336266040802 seconds
Output for 5.2.6
Inserting 16384 good elements took 0.0026891231536865 seconds Inserting 16384 evil elements took 1.3934779167175 seconds
Output for 5.2.5
Inserting 16384 good elements took 0.0035078525543213 seconds Inserting 16384 evil elements took 1.4016289710999 seconds
Output for 5.2.4
Inserting 16384 good elements took 0.0054771900177002 seconds Inserting 16384 evil elements took 1.3732750415802 seconds
Output for 5.2.3
Inserting 16384 good elements took 0.0034940242767334 seconds Inserting 16384 evil elements took 1.3885891437531 seconds
Output for 5.2.2
Inserting 16384 good elements took 0.0035438537597656 seconds Inserting 16384 evil elements took 1.3330399990082 seconds
Output for 5.2.1
Inserting 16384 good elements took 0.0029098987579346 seconds Inserting 16384 evil elements took 1.3377611637115 seconds
Output for 5.2.0
Inserting 16384 good elements took 0.0026350021362305 seconds Inserting 16384 evil elements took 1.3829731941223 seconds
Output for 5.1.6
Inserting 16384 good elements took 0.0099318027496338 seconds Inserting 16384 evil elements took 1.5985219478607 seconds
Output for 5.1.5
Inserting 16384 good elements took 0.0034248828887939 seconds Inserting 16384 evil elements took 1.6143069267273 seconds
Output for 5.1.4
Inserting 16384 good elements took 0.003715991973877 seconds Inserting 16384 evil elements took 1.6479861736298 seconds
Output for 5.1.3
Inserting 16384 good elements took 0.0033800601959229 seconds Inserting 16384 evil elements took 1.6666669845581 seconds
Output for 5.1.2
Inserting 16384 good elements took 0.0062899589538574 seconds Inserting 16384 evil elements took 1.6571300029755 seconds
Output for 5.1.1
Inserting 16384 good elements took 0.0030999183654785 seconds Inserting 16384 evil elements took 1.6268079280853 seconds
Output for 5.1.0
Inserting 16384 good elements took 0.0075969696044922 seconds Inserting 16384 evil elements took 1.6956889629364 seconds
Output for 5.0.5
Inserting 16384 good elements took 0.007310152053833 seconds Inserting 16384 evil elements took 1.6393330097198 seconds
Output for 5.0.4
Inserting 16384 good elements took 0.011070013046265 seconds Inserting 16384 evil elements took 1.6751029491425 seconds
Output for 5.0.3
Inserting 16384 good elements took 0.0061759948730469 seconds Inserting 16384 evil elements took 1.7562000751495 seconds
Output for 5.0.2
Inserting 16384 good elements took 0.0097870826721191 seconds Inserting 16384 evil elements took 1.6901688575745 seconds
Output for 5.0.1
Inserting 16384 good elements took 0.0066390037536621 seconds Inserting 16384 evil elements took 1.6522359848022 seconds
Output for 5.0.0
Inserting 16384 good elements took 0.0063760280609131 seconds Inserting 16384 evil elements took 1.6272189617157 seconds
Output for 4.4.9
Inserting 16384 good elements took 0.007547 seconds Inserting 16384 evil elements took -0.298384 seconds
Output for 4.4.8
Inserting 16384 good elements took 0.007485 seconds Inserting 16384 evil elements took 0.731567 seconds
Output for 4.4.7
Inserting 16384 good elements took 0.008197 seconds Inserting 16384 evil elements took -0.154595 seconds
Output for 4.4.6
Inserting 16384 good elements took 0.012004 seconds Inserting 16384 evil elements took -0.195884 seconds
Output for 4.4.5
Inserting 16384 good elements took 0.006393 seconds Inserting 16384 evil elements took -0.304778 seconds
Output for 4.4.4
Inserting 16384 good elements took 0.007874 seconds Inserting 16384 evil elements took -0.339987 seconds
Output for 4.4.3
Inserting 16384 good elements took 0.011319 seconds Inserting 16384 evil elements took 0.671851 seconds
Output for 4.4.2
Inserting 16384 good elements took 0.006332 seconds Inserting 16384 evil elements took -0.301194 seconds
Output for 4.4.1
Inserting 16384 good elements took 0.006891 seconds Inserting 16384 evil elements took -0.367552 seconds
Output for 4.4.0
Inserting 16384 good elements took 0.006773 seconds Inserting 16384 evil elements took 0.615655 seconds
Output for 4.3.11
Inserting 16384 good elements took 0.008001 seconds Inserting 16384 evil elements took -0.369903 seconds
Output for 4.3.10
Inserting 16384 good elements took 0.007364 seconds Inserting 16384 evil elements took -0.116715 seconds
Output for 4.3.9
Inserting 16384 good elements took 0.011365 seconds Inserting 16384 evil elements took -0.26174 seconds
Output for 4.3.8
Inserting 16384 good elements took 0.007594 seconds Inserting 16384 evil elements took 0.696678 seconds
Output for 4.3.7
Inserting 16384 good elements took 0.011166 seconds Inserting 16384 evil elements took -0.315369 seconds
Output for 4.3.6
Inserting 16384 good elements took 0.011756 seconds Inserting 16384 evil elements took -0.343001 seconds
Output for 4.3.5
Inserting 16384 good elements took 0.010926 seconds Inserting 16384 evil elements took -0.295867 seconds
Output for 4.3.4
Inserting 16384 good elements took 0.007695 seconds Inserting 16384 evil elements took 0.795059 seconds
Output for 4.3.3
Inserting 16384 good elements took 0.009852 seconds Inserting 16384 evil elements took -0.266389 seconds
Output for 4.3.2
Inserting 16384 good elements took 0.006924 seconds Inserting 16384 evil elements took -0.30794 seconds
Output for 4.3.1
Inserting 16384 good elements took 0.006496 seconds Inserting 16384 evil elements took -0.282306 seconds
Output for 4.3.0
Inserting 16384 good elements took 0.0095120000000001 seconds Inserting 16384 evil elements took -0.727276 seconds