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; } 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";
Output for 7.0.1, 7.1.0
Func took 0.47111511230469 microseconds<br />
Output for 7.0.14
Func took 0.54383277893066 microseconds<br />
Output for 7.0.10
Func took 0.42390823364258 microseconds<br />
Output for 7.0.9
Func took 0.46396255493164 microseconds<br />
Output for 7.0.8
Func took 0.49901008605957 microseconds<br />
Output for 7.0.7
Func took 0.44989585876465 microseconds<br />
Output for 7.0.6
Func took 0.47492980957031 microseconds<br />
Output for 7.0.5
Func took 0.37598609924316 microseconds<br />
Output for 7.0.4
Func took 0.56910514831543 microseconds<br />
Output for 7.0.3
Func took 0.640869140625 microseconds<br />
Output for 7.0.2
Func took 0.63300132751465 microseconds<br />
Output for 7.0.0
Func took 0.6101131439209 microseconds<br />
Output for 5.6.28
Func took 1.2810230255127 microseconds<br />
Output for 5.6.25
Func took 1.276969909668 microseconds<br />
Output for 5.6.24
Func took 2.0699501037598 microseconds<br />
Output for 5.6.23
Func took 1.0190010070801 microseconds<br />
Output for 5.6.22
Func took 1.3008117675781 microseconds<br />
Output for 5.6.21
Func took 1.0569095611572 microseconds<br />
Output for 5.6.20
Func took 0.89406967163086 microseconds<br />
Output for 5.6.19
Func took 1.0659694671631 microseconds<br />
Output for 5.6.18
Func took 1.0039806365967 microseconds<br />
Output for 5.5.8, 5.6.17
Func took 1.3620853424072 microseconds<br />
Output for 5.6.16
Func took 1.317024230957 microseconds<br />
Output for 5.6.15
Func took 1.147985458374 microseconds<br />
Output for 5.6.14
Func took 1.0550022125244 microseconds<br />
Output for 5.6.13
Func took 0.9009838104248 microseconds<br />
Output for 5.6.12
Func took 0.93579292297363 microseconds<br />
Output for 5.6.11
Func took 1.1918544769287 microseconds<br />
Output for 5.6.10
Func took 1.162052154541 microseconds<br />
Output for 5.6.9
Func took 1.2989044189453 microseconds<br />
Output for 5.6.8
Func took 1.1501312255859 microseconds<br />
Output for 5.6.7
Func took 1.0859966278076 microseconds<br />
Output for 5.6.6
Func took 0.87714195251465 microseconds<br />
Output for 5.6.5
Func took 1.3020038604736 microseconds<br />
Output for 5.6.4
Func took 0.81110000610352 microseconds<br />
Output for 5.6.3
Func took 1.3370513916016 microseconds<br />
Output for 5.6.2
Func took 0.96607208251953 microseconds<br />
Output for 5.4.3, 5.6.1
Func took 1.2040138244629 microseconds<br />
Output for 5.6.0
Func took 0.98800659179688 microseconds<br />
Output for 5.5.38
Func took 1.1279582977295 microseconds<br />
Output for 5.5.37
Func took 1.3117790222168 microseconds<br />
Output for 5.5.36
Func took 1.1401176452637 microseconds<br />
Output for 5.5.35
Func took 1.1470317840576 microseconds<br />
Output for 5.5.34
Func took 1.2130737304688 microseconds<br />
Output for 5.5.33
Func took 1.0509490966797 microseconds<br />
Output for 5.5.32
Func took 1.1601448059082 microseconds<br />
Output for 5.5.31
Func took 1.1930465698242 microseconds<br />
Output for 5.5.30
Func took 2.0270347595215 microseconds<br />
Output for 5.5.29
Func took 1.5668869018555 microseconds<br />
Output for 5.5.28
Func took 0.84996223449707 microseconds<br />
Output for 5.5.27
Func took 1.262903213501 microseconds<br />
Output for 5.5.26
Func took 1.3189315795898 microseconds<br />
Output for 5.3.22, 5.4.12, 5.5.25
Func took 1.3101100921631 microseconds<br />
Output for 5.5.24
Func took 1.4498233795166 microseconds<br />
Output for 5.5.23
Func took 0.97417831420898 microseconds<br />
Output for 5.5.22
Func took 1.1758804321289 microseconds<br />
Output for 5.3.11, 5.5.21
Func took 1.270055770874 microseconds<br />
Output for 5.5.20
Func took 1.471996307373 microseconds<br />
Output for 5.5.19
Func took 1.4088153839111 microseconds<br />
Output for 5.5.18
Func took 1.2209415435791 microseconds<br />
Output for 5.5.16
Func took 1.1239051818848 microseconds<br />
Output for 5.5.15
Func took 1.0991096496582 microseconds<br />
Output for 5.5.14
Func took 1.2819766998291 microseconds<br />
Output for 5.5.13
Func took 1.2562274932861 microseconds<br />
Output for 5.5.12
Func took 1.0950565338135 microseconds<br />
Output for 5.5.11
Func took 1.349925994873 microseconds<br />
Output for 5.5.10
Func took 0.89907646179199 microseconds<br />
Output for 5.5.9
Func took 1.0168552398682 microseconds<br />
Output for 5.3.25, 5.5.7
Func took 1.0349750518799 microseconds<br />
Output for 5.5.6
Func took 1.2719631195068 microseconds<br />
Output for 5.5.5
Func took 1.4581680297852 microseconds<br />
Output for 5.5.4
Func took 1.3630390167236 microseconds<br />
Output for 5.5.3
Func took 1.3649463653564 microseconds<br />
Output for 5.5.2
Func took 1.1382102966309 microseconds<br />
Output for 5.5.1
Func took 1.1529922485352 microseconds<br />
Output for 5.5.0
Func took 1.0528564453125 microseconds<br />
Output for 5.4.45
Func took 0.86307525634766 microseconds<br />
Output for 5.4.44
Func took 1.1670589447021 microseconds<br />
Output for 5.4.43
Func took 1.1038780212402 microseconds<br />
Output for 5.4.42
Func took 1.2359619140625 microseconds<br />
Output for 5.4.41
Func took 1.0559558868408 microseconds<br />
Output for 5.4.37, 5.4.40
Func took 1.1181831359863 microseconds<br />
Output for 5.4.39
Func took 1.1351108551025 microseconds<br />
Output for 5.4.31, 5.4.38
Func took 1.2879371643066 microseconds<br />
Output for 5.4.36
Func took 1.331090927124 microseconds<br />
Output for 5.4.35
Func took 1.1558532714844 microseconds<br />
Output for 5.4.34
Func took 0.88286399841309 microseconds<br />
Output for 5.4.32
Func took 1.1677742004395 microseconds<br />
Output for 5.4.30
Func took 0.83518028259277 microseconds<br />
Output for 5.4.29
Func took 0.89287757873535 microseconds<br />
Output for 5.4.28
Func took 1.1210441589355 microseconds<br />
Output for 5.4.27
Func took 1.1281967163086 microseconds<br />
Output for 5.4.26
Func took 2.5849342346191 microseconds<br />
Output for 5.4.25
Func took 1.068115234375 microseconds<br />
Output for 5.4.24
Func took 1.0590553283691 microseconds<br />
Output for 5.4.23
Func took 1.1990070343018 microseconds<br />
Output for 5.4.22
Func took 1.3821125030518 microseconds<br />
Output for 5.4.21
Func took 1.3420581817627 microseconds<br />
Output for 5.4.20
Func took 0.8699893951416 microseconds<br />
Output for 5.4.19
Func took 0.92506408691406 microseconds<br />
Output for 5.4.18
Func took 0.89097023010254 microseconds<br />
Output for 5.4.17
Func took 0.84614753723145 microseconds<br />
Output for 5.4.16
Func took 1.2381076812744 microseconds<br />
Output for 5.4.15
Func took 0.84304809570312 microseconds<br />
Output for 5.4.14
Func took 1.4770030975342 microseconds<br />
Output for 5.4.13
Func took 1.0600090026855 microseconds<br />
Output for 5.4.11
Func took 0.89001655578613 microseconds<br />
Output for 5.4.10
Func took 0.85902214050293 microseconds<br />
Output for 5.4.9
Func took 1.1129379272461 microseconds<br />
Output for 5.4.8
Func took 1.2078285217285 microseconds<br />
Output for 5.4.7
Func took 1.2431144714355 microseconds<br />
Output for 5.4.6
Func took 1.1639595031738 microseconds<br />
Output for 5.4.5
Func took 1.1849403381348 microseconds<br />
Output for 5.4.4
Func took 1.3980865478516 microseconds<br />
Output for 5.4.2
Func took 0.88310241699219 microseconds<br />
Output for 5.4.1
Func took 1.0640621185303 microseconds<br />
Output for 5.4.0
Func took 1.3949871063232 microseconds<br />
Output for 5.3.29
Func took 1.1489391326904 microseconds<br />
Output for 5.3.28
Func took 0.97107887268066 microseconds<br />
Output for 5.3.27
Func took 1.3349056243896 microseconds<br />
Output for 5.3.26
Func took 1.5220642089844 microseconds<br />
Output for 5.3.6, 5.3.24
Func took 1.3689994812012 microseconds<br />
Output for 5.3.23
Func took 1.2109279632568 microseconds<br />
Output for 5.3.21
Func took 0.83708763122559 microseconds<br />
Output for 5.3.20
Func took 1.6829967498779 microseconds<br />
Output for 5.3.19
Func took 1.3599395751953 microseconds<br />
Output for 5.3.18
Func took 1.284122467041 microseconds<br />
Output for 5.3.17
Func took 1.3430118560791 microseconds<br />
Output for 5.3.16
Func took 2.0129680633545 microseconds<br />
Output for 5.3.15
Func took 1.2459754943848 microseconds<br />
Output for 5.3.14
Func took 1.0631084442139 microseconds<br />
Output for 5.3.13
Func took 1.4598369598389 microseconds<br />
Output for 5.3.12
Func took 1.4638900756836 microseconds<br />
Output for 5.3.10
Func took 1.5468597412109 microseconds<br />
Output for 5.3.9
Func took 1.5621185302734 microseconds<br />
Output for 5.3.8
Func took 1.1320114135742 microseconds<br />
Output for 5.3.7
Func took 0.95486640930176 microseconds<br />
Output for 5.3.5
Func took 1.5780925750732 microseconds<br />
Output for 5.3.4
Func took 1.30295753479 microseconds<br />
Output for 5.3.3
Func took 1.3070106506348 microseconds<br />
Output for 5.3.2
Func took 1.0359287261963 microseconds<br />
Output for 5.3.1
Func took 1.0840892791748 microseconds<br />
Output for 5.3.0
Func took 1.5671253204346 microseconds<br />
Output for 5.2.17
Func took 3.3550262451172 microseconds<br />
Output for 5.2.16
Func took 3.046989440918 microseconds<br />
Output for 5.2.15
Func took 3.2129287719727 microseconds<br />
Output for 5.2.14
Func took 1.9650459289551 microseconds<br />
Output for 5.2.13
Func took 3.1712055206299 microseconds<br />
Output for 5.2.12
Func took 3.209114074707 microseconds<br />
Output for 5.2.11
Func took 2.0360946655273 microseconds<br />
Output for 5.2.10
Func took 2.5031566619873 microseconds<br />
Output for 5.2.9
Func took 2.9768943786621 microseconds<br />
Output for 5.2.8
Func took 2.6648044586182 microseconds<br />
Output for 5.2.7
Func took 2.8350353240967 microseconds<br />
Output for 5.2.6
Func took 2.0837783813477 microseconds<br />
Output for 5.2.5
Func took 3.4210681915283 microseconds<br />
Output for 5.2.4
Func took 3.8869380950928 microseconds<br />
Output for 5.2.3
Func took 3.2539367675781 microseconds<br />
Output for 5.2.2
Func took 2.8738975524902 microseconds<br />
Output for 5.2.1
Func took 2.5880336761475 microseconds<br />
Output for 5.2.0
Func took 2.371072769165 microseconds<br />
Output for 5.1.6
Func took 3.4689903259277 microseconds<br />
Output for 5.1.5
Func took 3.7009716033936 microseconds<br />
Output for 5.1.4
Func took 3.615140914917 microseconds<br />
Output for 5.1.3
Func took 3.0050277709961 microseconds<br />
Output for 5.1.2
Func took 3.4120082855225 microseconds<br />
Output for 5.1.1
Func took 3.7539005279541 microseconds<br />
Output for 5.1.0
Func took 3.0970573425293 microseconds<br />
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /in/6Spi8 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/6Spi8 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/6Spi8 on line 13
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/6Spi8 on line 13
Process exited with code 255.