3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $classmap1 = array(); for ($i=1; $i<=5000; $i++) { $classmap1['a'.$i] = $i+1; } $classmap2 = array(); for ($i=1; $i<=5000; $i++) { $classmap2['b'.$i] = $i+1; } $startTimeFunc = microtime(true); array_merge($classmap1, $classmap2); $endTimeFunc = microtime(true); echo "Func took " . (($endTimeFunc - $startTimeFunc)*1000) ." microseconds<br />\n";
Output for 7.1.0
Func took 0.46586990356445 microseconds<br />
Output for 7.0.14
Func took 0.46706199645996 microseconds<br />
Output for 7.0.10
Func took 0.52714347839355 microseconds<br />
Output for 7.0.9
Func took 18.969058990479 microseconds<br />
Output for 7.0.8
Func took 19.806861877441 microseconds<br />
Output for 7.0.7
Func took 18.032073974609 microseconds<br />
Output for 7.0.6
Func took 0.54693222045898 microseconds<br />
Output for 7.0.5
Func took 15.271186828613 microseconds<br />
Output for 7.0.4
Func took 0.48589706420898 microseconds<br />
Output for 7.0.3
Func took 0.41699409484863 microseconds<br />
Output for 7.0.2
Func took 0.61988830566406 microseconds<br />
Output for 7.0.1
Func took 0.52499771118164 microseconds<br />
Output for 7.0.0
Func took 0.42986869812012 microseconds<br />
Output for hhvm-3.12.0
Func took 0.5638599395752 microseconds<br />
Output for hhvm-3.10.0
Func took 0.49710273742676 microseconds<br />
Output for 5.6.28
Func took 1.4898777008057 microseconds<br />
Output for 5.6.25
Func took 1.5451908111572 microseconds<br />
Output for 5.6.24
Func took 1.5649795532227 microseconds<br />
Output for 5.5.26, 5.6.23
Func took 1.2381076812744 microseconds<br />
Output for 5.6.22
Func took 1.323938369751 microseconds<br />
Output for 5.6.21
Func took 1.4851093292236 microseconds<br />
Output for 5.6.20
Func took 1.5978813171387 microseconds<br />
Output for 5.6.1, 5.6.19
Func took 1.3329982757568 microseconds<br />
Output for 5.6.18
Func took 1.4388561248779 microseconds<br />
Output for 5.6.17
Func took 1.1091232299805 microseconds<br />
Output for 5.6.16
Func took 1.0251998901367 microseconds<br />
Output for 5.6.15
Func took 1.1940002441406 microseconds<br />
Output for 5.6.14
Func took 0.9911060333252 microseconds<br />
Output for 5.6.13
Func took 1.1169910430908 microseconds<br />
Output for 5.6.12
Func took 1.4989376068115 microseconds<br />
Output for 5.6.11
Func took 1.2271404266357 microseconds<br />
Output for 5.6.10
Func took 1.7321109771729 microseconds<br />
Output for 5.6.9
Func took 1.2950897216797 microseconds<br />
Output for 5.6.8
Func took 1.5759468078613 microseconds<br />
Output for 5.6.7
Func took 1.3978481292725 microseconds<br />
Output for 5.6.6
Func took 1.413106918335 microseconds<br />
Output for 5.6.5
Func took 1.4550685882568 microseconds<br />
Output for 5.6.4
Func took 1.2459754943848 microseconds<br />
Output for 5.6.3
Func took 1.2471675872803 microseconds<br />
Output for 5.6.2
Func took 1.3749599456787 microseconds<br />
Output for 5.6.0
Func took 1.4739036560059 microseconds<br />
Output for 5.5.38
Func took 1.5230178833008 microseconds<br />
Output for 5.5.37
Func took 1.488208770752 microseconds<br />
Output for 5.5.36
Func took 1.3279914855957 microseconds<br />
Output for 5.5.35
Func took 1.4839172363281 microseconds<br />
Output for 5.5.34
Func took 1.3031959533691 microseconds<br />
Output for 5.5.33
Func took 1.1768341064453 microseconds<br />
Output for 5.5.32
Func took 1.3511180877686 microseconds<br />
Output for 5.5.31
Func took 1.3010501861572 microseconds<br />
Output for 5.5.30
Func took 1.4069080352783 microseconds<br />
Output for 5.5.29
Func took 1.0871887207031 microseconds<br />
Output for 5.5.28
Func took 1.0678768157959 microseconds<br />
Output for 5.5.27
Func took 1.1508464813232 microseconds<br />
Output for 5.5.25
Func took 1.4030933380127 microseconds<br />
Output for 5.5.24
Func took 1.5139579772949 microseconds<br />
Output for 5.5.23
Func took 1.2111663818359 microseconds<br />
Output for 5.5.20, 5.5.22
Func took 1.4410018920898 microseconds<br />
Output for 5.5.21
Func took 1.2788772583008 microseconds<br />
Output for 5.5.19
Func took 1.5408992767334 microseconds<br />
Output for 5.5.18
Func took 1.1119842529297 microseconds<br />
Output for 5.5.16
Func took 1.5130043029785 microseconds<br />
Output for 5.5.15
Func took 1.6050338745117 microseconds<br />
Output for 5.5.6, 5.5.14
Func took 1.3229846954346 microseconds<br />
Output for 5.5.13
Func took 1.4381408691406 microseconds<br />
Output for 5.5.12
Func took 1.230001449585 microseconds<br />
Output for 5.5.11
Func took 1.5900135040283 microseconds<br />
Output for 5.5.10
Func took 1.5180110931396 microseconds<br />
Output for 5.5.9
Func took 1.2698173522949 microseconds<br />
Output for 5.5.8
Func took 1.507043838501 microseconds<br />
Output for 5.5.7
Func took 1.615047454834 microseconds<br />
Output for 5.5.5
Func took 2.7339458465576 microseconds<br />
Output for 5.5.4
Func took 1.7659664154053 microseconds<br />
Output for 5.5.3
Func took 2.5811195373535 microseconds<br />
Output for 5.5.2
Func took 2.8619766235352 microseconds<br />
Output for 5.4.2, 5.5.1
Func took 2.6729106903076 microseconds<br />
Output for 5.5.0
Func took 3.0050277709961 microseconds<br />
Output for 5.4.45
Func took 2.6290416717529 microseconds<br />
Output for 5.4.44
Func took 2.4490356445312 microseconds<br />
Output for 5.4.43
Func took 2.5389194488525 microseconds<br />
Output for 5.4.35, 5.4.42
Func took 2.7480125427246 microseconds<br />
Output for 5.4.41
Func took 2.1591186523438 microseconds<br />
Output for 5.4.40
Func took 2.7129650115967 microseconds<br />
Output for 5.3.4, 5.4.39
Func took 2.5808811187744 microseconds<br />
Output for 5.4.38
Func took 2.6330947875977 microseconds<br />
Output for 5.4.37
Func took 2.6278495788574 microseconds<br />
Output for 5.4.36
Func took 2.5739669799805 microseconds<br />
Output for 5.4.34
Func took 2.6721954345703 microseconds<br />
Output for 5.4.32
Func took 2.6779174804688 microseconds<br />
Output for 5.4.31
Func took 2.7270317077637 microseconds<br />
Output for 5.4.30
Func took 2.3479461669922 microseconds<br />
Output for 5.4.29
Func took 2.7809143066406 microseconds<br />
Output for 5.4.28
Func took 2.3741722106934 microseconds<br />
Output for 5.4.27
Func took 2.5260448455811 microseconds<br />
Output for 5.4.26
Func took 2.8347969055176 microseconds<br />
Output for 5.4.25
Func took 2.9079914093018 microseconds<br />
Output for 5.4.24
Func took 2.3989677429199 microseconds<br />
Output for 5.4.23
Func took 2.769947052002 microseconds<br />
Output for 5.4.22
Func took 1.9919872283936 microseconds<br />
Output for 5.4.21
Func took 1.9040107727051 microseconds<br />
Output for 5.4.20
Func took 2.7048587799072 microseconds<br />
Output for 5.4.19
Func took 2.7050971984863 microseconds<br />
Output for 5.4.18
Func took 2.0689964294434 microseconds<br />
Output for 5.4.17
Func took 2.6559829711914 microseconds<br />
Output for 5.4.16
Func took 1.8219947814941 microseconds<br />
Output for 5.3.11, 5.4.15
Func took 2.5110244750977 microseconds<br />
Output for 5.4.14
Func took 2.0830631256104 microseconds<br />
Output for 5.4.13
Func took 2.9730796813965 microseconds<br />
Output for 5.4.9, 5.4.12
Func took 2.8548240661621 microseconds<br />
Output for 5.4.11
Func took 2.2618770599365 microseconds<br />
Output for 5.4.10
Func took 2.8998851776123 microseconds<br />
Output for 5.4.8
Func took 2.5520324707031 microseconds<br />
Output for 5.4.7
Func took 2.6681423187256 microseconds<br />
Output for 5.4.6
Func took 2.500057220459 microseconds<br />
Output for 5.4.5
Func took 2.4240016937256 microseconds<br />
Output for 5.4.4
Func took 2.1700859069824 microseconds<br />
Output for 5.4.1, 5.4.3
Func took 2.8319358825684 microseconds<br />
Output for 5.4.0
Func took 2.6509761810303 microseconds<br />
Output for 5.3.29
Func took 2.9659271240234 microseconds<br />
Output for 5.3.28
Func took 2.3391246795654 microseconds<br />
Output for 5.3.27
Func took 2.701997756958 microseconds<br />
Output for 5.3.26
Func took 2.7320384979248 microseconds<br />
Output for 5.3.25
Func took 2.4209022521973 microseconds<br />
Output for 5.3.24
Func took 2.5360584259033 microseconds<br />
Output for 5.3.23
Func took 2.6061534881592 microseconds<br />
Output for 5.3.22
Func took 3.0310153961182 microseconds<br />
Output for 5.3.21
Func took 2.3550987243652 microseconds<br />
Output for 5.3.20
Func took 2.7370452880859 microseconds<br />
Output for 5.3.19
Func took 2.5560855865479 microseconds<br />
Output for 5.3.18
Func took 2.4440288543701 microseconds<br />
Output for 5.3.8, 5.3.17
Func took 2.2649765014648 microseconds<br />
Output for 5.3.16
Func took 2.8121471405029 microseconds<br />
Output for 5.3.15
Func took 2.5699138641357 microseconds<br />
Output for 5.3.14
Func took 2.5370121002197 microseconds<br />
Output for 5.3.13
Func took 2.2940635681152 microseconds<br />
Output for 5.3.12
Func took 2.6919841766357 microseconds<br />
Output for 5.3.10
Func took 2.6628971099854 microseconds<br />
Output for 5.3.9
Func took 2.9449462890625 microseconds<br />
Output for 5.3.7
Func took 2.7840137481689 microseconds<br />
Output for 5.3.6
Func took 3.0500888824463 microseconds<br />
Output for 5.3.5
Func took 2.8800964355469 microseconds<br />
Output for 5.3.3
Func took 2.6490688323975 microseconds<br />
Output for 5.3.2
Func took 2.6969909667969 microseconds<br />
Output for 5.3.1
Func took 2.9339790344238 microseconds<br />
Output for 5.3.0
Func took 1.0190010070801 microseconds<br />
Output for 5.2.17
Func took 2.964973449707 microseconds<br />
Output for 5.2.16
Func took 3.148078918457 microseconds<br />
Output for 5.2.15
Func took 2.4211406707764 microseconds<br />
Output for 5.2.14
Func took 2.8080940246582 microseconds<br />
Output for 5.2.13
Func took 2.8281211853027 microseconds<br />
Output for 5.2.12
Func took 2.8719902038574 microseconds<br />
Output for 5.2.11
Func took 3.2169818878174 microseconds<br />
Output for 5.2.10
Func took 2.673864364624 microseconds<br />
Output for 5.2.9
Func took 3.068208694458 microseconds<br />
Output for 5.2.8
Func took 3.1669139862061 microseconds<br />
Output for 5.2.7
Func took 2.3679733276367 microseconds<br />
Output for 5.2.6
Func took 2.6071071624756 microseconds<br />
Output for 5.2.5
Func took 4.2581558227539 microseconds<br />
Output for 5.2.4
Func took 4.3070316314697 microseconds<br />
Output for 5.2.3
Func took 3.7479400634766 microseconds<br />
Output for 5.2.2
Func took 4.1990280151367 microseconds<br />
Output for 5.2.1
Func took 2.1979808807373 microseconds<br />
Output for 5.2.0
Func took 2.3441314697266 microseconds<br />
Output for 5.1.6
Func took 4.256010055542 microseconds<br />
Output for 5.1.5
Func took 4.310131072998 microseconds<br />
Output for 5.1.4
Func took 3.4558773040771 microseconds<br />
Output for 5.1.3
Func took 4.518985748291 microseconds<br />
Output for 5.1.2
Func took 3.5319328308105 microseconds<br />
Output for 5.1.1
Func took 3.5800933837891 microseconds<br />
Output for 5.1.0
Func took 4.2159557342529 microseconds<br />
Output for 5.0.5
Func took 3.5009384155273 microseconds<br />
Output for 5.0.4
Func took 3.5688877105713 microseconds<br />
Output for 5.0.3
Func took 2.8698444366455 microseconds<br />
Output for 5.0.2
Func took 4.6708583831787 microseconds<br />
Output for 5.0.1
Func took 3.0300617218018 microseconds<br />
Output for 5.0.0
Func took 2.7141571044922 microseconds<br />
Output for 4.4.9
Func took 4.379 microseconds<br />
Output for 4.4.8
Func took 4.615 microseconds<br />
Output for 4.4.7
Func took 4.286 microseconds<br />
Output for 4.4.6
Func took 5.077 microseconds<br />
Output for 4.4.5
Func took 3.475 microseconds<br />
Output for 4.4.4
Func took 4.387 microseconds<br />
Output for 4.4.3
Func took 4.966 microseconds<br />
Output for 4.4.2
Func took 4.794 microseconds<br />
Output for 4.4.1
Func took 4.446 microseconds<br />
Output for 4.4.0
Func took 4.808 microseconds<br />
Output for 4.3.11
Func took 4.039 microseconds<br />
Output for 4.3.10
Func took 3.723 microseconds<br />
Output for 4.3.9
Func took 3.975 microseconds<br />
Output for 4.3.8
Func took 3.991 microseconds<br />
Output for 4.3.7
Func took 2.699 microseconds<br />
Output for 4.3.6
Func took 3.551 microseconds<br />
Output for 4.3.5
Func took 2.432 microseconds<br />
Output for 4.3.4
Func took 2.403 microseconds<br />
Output for 4.3.3
Func took 2.608 microseconds<br />
Output for 4.3.2
Func took 2.84 microseconds<br />
Output for 4.3.1
Func took 2.901 microseconds<br />
Output for 4.3.0
Func took 2.661 microseconds<br />