3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $classmap1 = array(); for ($i=1; $i<=10000; $i++) { $classmap1['a'.$i] = $i+1; } $classmap2 = array(); for ($i=1; $i<=10000; $i++) { $classmap2['b'.$i] = $i+1; } abstract class merging { public static function merge(array &$a, array &$b) { foreach ($b as $key => $value) { $a[$key] = $value; } return $a; } } $startTimeFunc = microtime(true); merging::merge($classmap1, $classmap2); $endTimeFunc = microtime(true); echo "Func took " . (($endTimeFunc - $startTimeFunc)*1000) ." microseconds<br />\n"; //var_dump($am);
Output for 7.1.0
Func took 0.57005882263184 microseconds<br />
Output for 7.0.14
Func took 0.66804885864258 microseconds<br />
Output for 7.0.7
Func took 0.64802169799805 microseconds<br />
Output for 7.0.6
Func took 0.54311752319336 microseconds<br />
Output for 7.0.5
Func took 0.63395500183105 microseconds<br />
Output for 7.0.4
Func took 0.67019462585449 microseconds<br />
Output for 7.0.3
Func took 0.66399574279785 microseconds<br />
Output for 7.0.2
Func took 0.53811073303223 microseconds<br />
Output for 7.0.1
Func took 0.62084197998047 microseconds<br />
Output for 7.0.0
Func took 0.6561279296875 microseconds<br />
Output for hhvm-3.12.0
Func took 1.0321140289307 microseconds<br />
Output for hhvm-3.10.0
Func took 1.1928081512451 microseconds<br />
Output for 5.6.28
Func took 2.640962600708 microseconds<br />
Output for 5.6.22
Func took 2.4590492248535 microseconds<br />
Output for 5.6.21
Func took 2.7101039886475 microseconds<br />
Output for 5.6.20
Func took 2.6819705963135 microseconds<br />
Output for 5.6.19
Func took 2.5060176849365 microseconds<br />
Output for 5.6.18
Func took 2.9189586639404 microseconds<br />
Output for 5.6.17
Func took 2.7539730072021 microseconds<br />
Output for 5.6.16
Func took 2.6099681854248 microseconds<br />
Output for 5.6.15
Func took 2.7718544006348 microseconds<br />
Output for 5.6.14
Func took 2.7379989624023 microseconds<br />
Output for 5.6.13
Func took 2.2459030151367 microseconds<br />
Output for 5.6.12
Func took 1.6939640045166 microseconds<br />
Output for 5.6.11
Func took 2.0740032196045 microseconds<br />
Output for 5.6.10
Func took 1.662015914917 microseconds<br />
Output for 5.6.9
Func took 2.3031234741211 microseconds<br />
Output for 5.6.8
Func took 1.7480850219727 microseconds<br />
Output for 5.6.7
Func took 2.7341842651367 microseconds<br />
Output for 5.6.6
Func took 2.4948120117188 microseconds<br />
Output for 5.6.5
Func took 2.8259754180908 microseconds<br />
Output for 5.6.4
Func took 2.3682117462158 microseconds<br />
Output for 5.6.3
Func took 2.7868747711182 microseconds<br />
Output for 5.6.2
Func took 2.7048587799072 microseconds<br />
Output for 5.6.1
Func took 3.075122833252 microseconds<br />
Output for 5.6.0
Func took 2.8889179229736 microseconds<br />
Output for 5.3.28, 5.5.36
Func took 2.7549266815186 microseconds<br />
Output for 5.5.35
Func took 2.6090145111084 microseconds<br />
Output for 5.5.34
Func took 2.8839111328125 microseconds<br />
Output for 5.5.33
Func took 1.7659664154053 microseconds<br />
Output for 5.5.32
Func took 2.9349327087402 microseconds<br />
Output for 5.5.31
Func took 2.302885055542 microseconds<br />
Output for 5.5.30
Func took 2.3529529571533 microseconds<br />
Output for 5.5.29
Func took 2.0859241485596 microseconds<br />
Output for 5.5.28
Func took 2.8159618377686 microseconds<br />
Output for 5.5.27
Func took 2.6960372924805 microseconds<br />
Output for 5.5.26
Func took 2.6750564575195 microseconds<br />
Output for 5.5.25
Func took 2.1431446075439 microseconds<br />
Output for 5.5.24
Func took 2.1429061889648 microseconds<br />
Output for 5.5.23
Func took 2.4089813232422 microseconds<br />
Output for 5.5.22
Func took 2.8529167175293 microseconds<br />
Output for 5.5.21
Func took 2.5639533996582 microseconds<br />
Output for 5.4.4, 5.5.20
Func took 2.4600028991699 microseconds<br />
Output for 5.5.19
Func took 2.4220943450928 microseconds<br />
Output for 5.5.18
Func took 1.7709732055664 microseconds<br />
Output for 5.5.16
Func took 2.5291442871094 microseconds<br />
Output for 5.5.15
Func took 2.4399757385254 microseconds<br />
Output for 5.5.14
Func took 2.6438236236572 microseconds<br />
Output for 5.5.13
Func took 2.5138854980469 microseconds<br />
Output for 5.5.12
Func took 2.9950141906738 microseconds<br />
Output for 5.5.11
Func took 2.4700164794922 microseconds<br />
Output for 5.5.10
Func took 2.1851062774658 microseconds<br />
Output for 5.5.9
Func took 2.9709339141846 microseconds<br />
Output for 5.5.8
Func took 2.7809143066406 microseconds<br />
Output for 5.5.7
Func took 2.7511119842529 microseconds<br />
Output for 5.5.6
Func took 1.8479824066162 microseconds<br />
Output for 5.5.5
Func took 2.701997756958 microseconds<br />
Output for 5.5.4
Func took 2.946138381958 microseconds<br />
Output for 5.5.3
Func took 1.8179416656494 microseconds<br />
Output for 5.5.2
Func took 2.1131038665771 microseconds<br />
Output for 5.5.1
Func took 2.0549297332764 microseconds<br />
Output for 5.5.0
Func took 2.7520656585693 microseconds<br />
Output for 5.4.9, 5.4.45
Func took 3.2958984375 microseconds<br />
Output for 5.4.44
Func took 1.8789768218994 microseconds<br />
Output for 5.4.43
Func took 2.3038387298584 microseconds<br />
Output for 5.4.42
Func took 1.8599033355713 microseconds<br />
Output for 5.4.41
Func took 2.936840057373 microseconds<br />
Output for 5.4.40
Func took 2.500057220459 microseconds<br />
Output for 5.4.39
Func took 2.5949478149414 microseconds<br />
Output for 5.4.38
Func took 2.2580623626709 microseconds<br />
Output for 5.4.37
Func took 2.5730133056641 microseconds<br />
Output for 5.4.36
Func took 2.3810863494873 microseconds<br />
Output for 5.4.35
Func took 2.769947052002 microseconds<br />
Output for 5.4.34
Func took 2.9878616333008 microseconds<br />
Output for 5.4.32
Func took 3.0860900878906 microseconds<br />
Output for 5.4.31
Func took 3.4608840942383 microseconds<br />
Output for 5.4.30
Func took 2.964973449707 microseconds<br />
Output for 5.4.29
Func took 2.8450489044189 microseconds<br />
Output for 5.4.28
Func took 2.4831295013428 microseconds<br />
Output for 5.4.27
Func took 2.3109912872314 microseconds<br />
Output for 5.4.26
Func took 2.9549598693848 microseconds<br />
Output for 5.4.25
Func took 2.112865447998 microseconds<br />
Output for 5.4.24
Func took 2.6209354400635 microseconds<br />
Output for 5.4.23
Func took 2.3550987243652 microseconds<br />
Output for 5.4.22
Func took 2.9938220977783 microseconds<br />
Output for 5.4.21
Func took 2.2561550140381 microseconds<br />
Output for 5.4.20
Func took 3.0269622802734 microseconds<br />
Output for 5.4.19
Func took 2.8388500213623 microseconds<br />
Output for 5.4.18
Func took 2.3138523101807 microseconds<br />
Output for 5.4.17
Func took 2.6669502258301 microseconds<br />
Output for 5.4.16
Func took 2.5691986083984 microseconds<br />
Output for 5.4.15
Func took 2.8018951416016 microseconds<br />
Output for 5.4.14
Func took 2.5777816772461 microseconds<br />
Output for 5.4.13
Func took 2.824068069458 microseconds<br />
Output for 5.4.12
Func took 2.9430389404297 microseconds<br />
Output for 5.4.11
Func took 2.6848316192627 microseconds<br />
Output for 5.4.10
Func took 3.1020641326904 microseconds<br />
Output for 5.4.8
Func took 2.9079914093018 microseconds<br />
Output for 5.4.7
Func took 1.8310546875 microseconds<br />
Output for 5.4.6
Func took 2.9740333557129 microseconds<br />
Output for 5.4.5
Func took 3.0357837677002 microseconds<br />
Output for 5.4.3
Func took 2.0489692687988 microseconds<br />
Output for 5.4.2
Func took 2.9590129852295 microseconds<br />
Output for 5.4.1
Func took 2.9599666595459 microseconds<br />
Output for 5.4.0
Func took 3.0069351196289 microseconds<br />
Output for 5.3.29
Func took 2.4499893188477 microseconds<br />
Output for 5.3.27
Func took 2.4449825286865 microseconds<br />
Output for 5.3.1, 5.3.26
Func took 3.0970573425293 microseconds<br />
Output for 5.3.25
Func took 2.6168823242188 microseconds<br />
Output for 5.3.24
Func took 3.0179023742676 microseconds<br />
Output for 5.3.23
Func took 3.0169486999512 microseconds<br />
Output for 5.3.22
Func took 3.2980442047119 microseconds<br />
Output for 5.3.21
Func took 3.1239986419678 microseconds<br />
Output for 5.3.20
Func took 2.7129650115967 microseconds<br />
Output for 5.3.19
Func took 2.7890205383301 microseconds<br />
Output for 5.3.18
Func took 3.0579566955566 microseconds<br />
Output for 5.3.17
Func took 2.6519298553467 microseconds<br />
Output for 5.3.16
Func took 3.1168460845947 microseconds<br />
Output for 5.3.15
Func took 2.9659271240234 microseconds<br />
Output for 5.3.14
Func took 2.1641254425049 microseconds<br />
Output for 5.3.13
Func took 2.1519660949707 microseconds<br />
Output for 5.3.12
Func took 3.0770301818848 microseconds<br />
Output for 5.3.11
Func took 2.593994140625 microseconds<br />
Output for 5.3.10
Func took 2.479076385498 microseconds<br />
Output for 5.3.9
Func took 3.0608177185059 microseconds<br />
Output for 5.3.8
Func took 3.1850337982178 microseconds<br />
Output for 5.3.7
Func took 3.2219886779785 microseconds<br />
Output for 5.3.6
Func took 2.9888153076172 microseconds<br />
Output for 5.3.5
Func took 2.9690265655518 microseconds<br />
Output for 5.3.4
Func took 2.6929378509521 microseconds<br />
Output for 5.3.3
Func took 2.5761127471924 microseconds<br />
Output for 5.3.2
Func took 3.0109882354736 microseconds<br />
Output for 5.3.0
Func took 3.101110458374 microseconds<br />
Output for 5.2.17
Func took 5.6819915771484 microseconds<br />
Output for 5.2.16
Func took 5.3629875183105 microseconds<br />
Output for 5.2.15
Func took 5.4419040679932 microseconds<br />
Output for 5.2.14
Func took 5.1028728485107 microseconds<br />
Output for 5.2.13
Func took 6.2861442565918 microseconds<br />
Output for 5.2.12
Func took 7.3230266571045 microseconds<br />
Output for 5.2.11
Func took 5.1968097686768 microseconds<br />
Output for 5.2.10
Func took 5.4221153259277 microseconds<br />
Output for 5.2.9
Func took 6.9308280944824 microseconds<br />
Output for 5.2.8
Func took 6.2339305877686 microseconds<br />
Output for 5.1.5, 5.2.7
Func took 6.680965423584 microseconds<br />
Output for 5.2.6
Func took 6.2799453735352 microseconds<br />
Output for 5.2.5
Func took 6.9210529327393 microseconds<br />
Output for 5.2.4
Func took 6.6759586334229 microseconds<br />
Output for 5.2.3
Func took 7.0171356201172 microseconds<br />
Output for 5.2.2
Func took 8.2530975341797 microseconds<br />
Output for 5.2.1
Func took 5.5041313171387 microseconds<br />
Output for 5.2.0
Func took 6.0498714447021 microseconds<br />
Output for 5.1.6
Func took 8.491039276123 microseconds<br />
Output for 5.1.4
Func took 8.1930160522461 microseconds<br />
Output for 5.1.3
Func took 7.194995880127 microseconds<br />
Output for 5.1.2
Func took 8.0788135528564 microseconds<br />
Output for 5.1.1
Func took 6.5739154815674 microseconds<br />
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/HYsh3 on line 28
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /in/HYsh3 on line 15
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_CLASS in /in/HYsh3 on line 14
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_CLASS in /in/HYsh3 on line 14
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/HYsh3 on line 14
Process exited with code 255.