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.4880428314209 microseconds<br />
Output for 7.0.14
Func took 0.67400932312012 microseconds<br />
Output for 7.0.6
Func took 0.93412399291992 microseconds<br />
Output for 7.0.5
Func took 0.73599815368652 microseconds<br />
Output for 7.0.4
Func took 0.68998336791992 microseconds<br />
Output for 7.0.3
Func took 0.51712989807129 microseconds<br />
Output for 7.0.2
Func took 0.47802925109863 microseconds<br />
Output for 7.0.1
Func took 0.58388710021973 microseconds<br />
Output for 7.0.0
Func took 0.61798095703125 microseconds<br />
Output for hhvm-3.12.0
Func took 2.9990673065186 microseconds<br />
Output for hhvm-3.10.0
Func took 1.0828971862793 microseconds<br />
Output for 5.6.28
Func took 2.636194229126 microseconds<br />
Output for 5.6.21
Func took 2.1789073944092 microseconds<br />
Output for 5.6.20
Func took 2.3031234741211 microseconds<br />
Output for 5.6.19
Func took 2.208948135376 microseconds<br />
Output for 5.6.18
Func took 1.5590190887451 microseconds<br />
Output for 5.6.17
Func took 1.7690658569336 microseconds<br />
Output for 5.6.16
Func took 1.9631385803223 microseconds<br />
Output for 5.6.15
Func took 2.6700496673584 microseconds<br />
Output for 5.6.14
Func took 2.3128986358643 microseconds<br />
Output for 5.6.13
Func took 1.9350051879883 microseconds<br />
Output for 5.4.4, 5.6.12
Func took 2.2590160369873 microseconds<br />
Output for 5.6.11
Func took 2.3000240325928 microseconds<br />
Output for 5.6.10
Func took 2.7139186859131 microseconds<br />
Output for 5.6.9
Func took 1.6319751739502 microseconds<br />
Output for 5.6.8
Func took 2.0749568939209 microseconds<br />
Output for 5.5.35
Func took 1.3480186462402 microseconds<br />
Output for 5.5.34
Func took 2.5620460510254 microseconds<br />
Output for 5.5.33
Func took 1.7421245574951 microseconds<br />
Output for 5.5.32
Func took 1.7118453979492 microseconds<br />
Output for 5.5.31
Func took 2.3279190063477 microseconds<br />
Output for 5.5.30
Func took 2.7110576629639 microseconds<br />
Output for 5.5.29
Func took 1.8119812011719 microseconds<br />
Output for 5.5.28
Func took 2.4068355560303 microseconds<br />
Output for 5.5.27
Func took 1.8138885498047 microseconds<br />
Output for 5.5.26
Func took 1.6589164733887 microseconds<br />
Output for 5.5.25
Func took 3.3650398254395 microseconds<br />
Output for 5.5.24
Func took 2.7480125427246 microseconds<br />
Output for 5.4.45
Func took 2.2420883178711 microseconds<br />
Output for 5.4.44
Func took 1.7590522766113 microseconds<br />
Output for 5.4.43
Func took 1.784086227417 microseconds<br />
Output for 5.4.42
Func took 2.1440982818604 microseconds<br />
Output for 5.4.41
Func took 2.9008388519287 microseconds<br />
Output for 5.4.40
Func took 2.2261142730713 microseconds<br />
Output for 5.4.39
Func took 1.9750595092773 microseconds<br />
Output for 5.4.38
Func took 2.3348331451416 microseconds<br />
Output for 5.4.37
Func took 2.3648738861084 microseconds<br />
Output for 5.4.10, 5.4.36
Func took 2.3159980773926 microseconds<br />
Output for 5.4.35
Func took 2.1049976348877 microseconds<br />
Output for 5.4.34
Func took 2.647876739502 microseconds<br />
Output for 5.4.32
Func took 1.7948150634766 microseconds<br />
Output for 5.4.31
Func took 2.0530223846436 microseconds<br />
Output for 5.4.30
Func took 1.7428398132324 microseconds<br />
Output for 5.4.29
Func took 2.0580291748047 microseconds<br />
Output for 5.4.28
Func took 2.2621154785156 microseconds<br />
Output for 5.4.27
Func took 2.4209022521973 microseconds<br />
Output for 5.4.26
Func took 2.2599697113037 microseconds<br />
Output for 5.4.25
Func took 2.4650096893311 microseconds<br />
Output for 5.4.24
Func took 2.4797916412354 microseconds<br />
Output for 5.4.23
Func took 2.4409294128418 microseconds<br />
Output for 5.4.22
Func took 2.187967300415 microseconds<br />
Output for 5.4.21
Func took 2.8109550476074 microseconds<br />
Output for 5.4.20
Func took 2.1750926971436 microseconds<br />
Output for 5.4.19
Func took 2.2680759429932 microseconds<br />
Output for 5.4.18
Func took 2.2819042205811 microseconds<br />
Output for 5.4.17
Func took 2.2799968719482 microseconds<br />
Output for 5.4.16
Func took 2.05397605896 microseconds<br />
Output for 5.4.15
Func took 2.3691654205322 microseconds<br />
Output for 5.4.14
Func took 2.2768974304199 microseconds<br />
Output for 5.4.13
Func took 2.2969245910645 microseconds<br />
Output for 5.4.12
Func took 2.1347999572754 microseconds<br />
Output for 5.4.11
Func took 2.0489692687988 microseconds<br />
Output for 5.4.9
Func took 1.7149448394775 microseconds<br />
Output for 5.4.8
Func took 2.6957988739014 microseconds<br />
Output for 5.4.7
Func took 2.1800994873047 microseconds<br />
Output for 5.4.6
Func took 3.0331611633301 microseconds<br />
Output for 5.4.5
Func took 2.3930072784424 microseconds<br />
Output for 5.4.3
Func took 1.8951892852783 microseconds<br />
Output for 5.4.2
Func took 2.7740001678467 microseconds<br />
Output for 5.4.1
Func took 2.1011829376221 microseconds<br />
Output for 5.4.0
Func took 2.2609233856201 microseconds<br />
Output for 5.3.29
Func took 2.4628639221191 microseconds<br />
Output for 5.3.28
Func took 2.410888671875 microseconds<br />
Output for 5.3.27
Func took 2.5229454040527 microseconds<br />
Output for 5.3.26
Func took 2.1340847015381 microseconds<br />
Output for 5.3.25
Func took 2.3760795593262 microseconds<br />
Output for 5.3.24
Func took 2.4869441986084 microseconds<br />
Output for 5.3.23
Func took 2.5079250335693 microseconds<br />
Output for 5.3.22
Func took 2.2790431976318 microseconds<br />
Output for 5.3.21
Func took 2.7151107788086 microseconds<br />
Output for 5.3.20
Func took 2.626895904541 microseconds<br />
Output for 5.3.19
Func took 2.0709037780762 microseconds<br />
Output for 5.3.18
Func took 2.418041229248 microseconds<br />
Output for 5.3.17
Func took 1.8088817596436 microseconds<br />
Output for 5.3.16
Func took 2.3791790008545 microseconds<br />
Output for 5.3.15
Func took 1.8668174743652 microseconds<br />
Output for 5.3.14
Func took 2.4380683898926 microseconds<br />
Output for 5.3.13
Func took 2.504825592041 microseconds<br />
Output for 5.3.12
Func took 2.1610260009766 microseconds<br />
Output for 5.3.11
Func took 1.823902130127 microseconds<br />
Output for 5.3.10
Func took 2.1882057189941 microseconds<br />
Output for 5.3.9
Func took 2.4700164794922 microseconds<br />
Output for 5.3.8
Func took 2.3288726806641 microseconds<br />
Output for 5.3.7
Func took 4.3821334838867 microseconds<br />
Output for 5.3.6
Func took 2.1500587463379 microseconds<br />
Output for 5.3.5
Func took 2.7379989624023 microseconds<br />
Output for 5.3.4
Func took 2.399206161499 microseconds<br />
Output for 5.3.3
Func took 1.9819736480713 microseconds<br />
Output for 5.3.2
Func took 2.3200511932373 microseconds<br />
Output for 5.3.1
Func took 1.8970966339111 microseconds<br />
Output for 5.3.0
Func took 2.0959377288818 microseconds<br />
Output for 5.2.17
Func took 5.1679611206055 microseconds<br />
Output for 5.2.16
Func took 3.9968490600586 microseconds<br />
Output for 5.2.15
Func took 5.0749778747559 microseconds<br />
Output for 5.2.14
Func took 3.7791728973389 microseconds<br />
Output for 5.2.13
Func took 4.2579174041748 microseconds<br />
Output for 5.2.12
Func took 3.835916519165 microseconds<br />
Output for 5.2.11
Func took 5.4891109466553 microseconds<br />
Output for 5.2.10
Func took 5.4490566253662 microseconds<br />
Output for 5.2.9
Func took 3.8390159606934 microseconds<br />
Output for 5.2.8
Func took 4.4379234313965 microseconds<br />
Output for 5.2.7
Func took 5.4378509521484 microseconds<br />
Output for 5.2.6
Func took 5.5580139160156 microseconds<br />
Output for 5.2.5
Func took 5.1820278167725 microseconds<br />
Output for 5.2.4
Func took 6.5560340881348 microseconds<br />
Output for 5.2.3
Func took 4.6870708465576 microseconds<br />
Output for 5.2.2
Func took 6.5550804138184 microseconds<br />
Output for 5.2.1
Func took 5.3610801696777 microseconds<br />
Output for 5.2.0
Func took 5.18798828125 microseconds<br />
Output for 5.1.6
Func took 5.9058666229248 microseconds<br />
Output for 5.1.5
Func took 6.6359043121338 microseconds<br />
Output for 5.1.4
Func took 4.6019554138184 microseconds<br />
Output for 5.1.3
Func took 6.9730281829834 microseconds<br />
Output for 5.1.2
Func took 6.7970752716064 microseconds<br />
Output for 5.1.1
Func took 6.4029693603516 microseconds<br />
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/0Uq75 on line 27
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/0Uq75 on line 14
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_CLASS in /in/0Uq75 on line 13
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/0Uq75 on line 13
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/0Uq75 on line 13
Process exited with code 255.