3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo {} $foo = new Foo; $rounds = 1000000; $start = microtime(true); $name = get_class($foo); for($i=0; $i<$rounds; $i++) { $name; } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); $name = (new ReflectionClass($foo))->getName(); for($i=0; $i<$rounds; $i++) { $name; } echo (microtime(true) - $start);
Output for 7.1.0
0.013553142547607 0.012984037399292
Output for 7.0.14
0.032289981842041 0.028735876083374
Output for 7.0.6
0.012876987457275 0.012471914291382
Output for 7.0.5
0.011802911758423 0.011114120483398
Output for 7.0.4
0.012415170669556 0.010020971298218
Output for 7.0.3
0.010389089584351 0.01082706451416
Output for 7.0.2
0.0076148509979248 0.0076069831848145
Output for 7.0.1
0.013404846191406 0.0089499950408936
Output for 7.0.0
0.010118961334229 0.010359048843384
Output for hhvm-3.12.0
0.040703058242798 0.042448997497559
Output for hhvm-3.10.0
0.051483869552612 0.054077863693237
Output for 5.6.28
0.033176898956299 0.030166149139404
Output for 5.6.21
0.031219005584717 0.028241872787476
Output for 5.6.20
0.032037973403931 0.023061037063599
Output for 5.6.19
0.031071186065674 0.02768611907959
Output for 5.6.18
0.030939817428589 0.028246879577637
Output for 5.6.17
0.030128955841064 0.026776075363159
Output for 5.6.16
0.027744054794312 0.025528907775879
Output for 5.6.15
0.029392004013062 0.026389122009277
Output for 5.6.14
0.036643028259277 0.025895118713379
Output for 5.6.13
0.030892848968506 0.024393081665039
Output for 5.6.12
0.031475067138672 0.027262926101685
Output for 5.6.11
0.025986194610596 0.024023056030273
Output for 5.6.10
0.034603118896484 0.030030012130737
Output for 5.6.9
0.031899929046631 0.0276939868927
Output for 5.6.8
0.02659797668457 0.024645090103149
Output for 5.6.7
0.0350501537323 0.029265880584717
Output for 5.6.6
0.032044172286987 0.028252840042114
Output for 5.6.5
0.036109924316406 0.031412124633789
Output for 5.6.4
0.03137993812561 0.027723073959351
Output for 5.6.3
0.033699035644531 0.029350996017456
Output for 5.6.2
0.031029939651489 0.024806022644043
Output for 5.6.1
0.031681060791016 0.027235984802246
Output for 5.6.0
0.031038999557495 0.024461984634399
Output for 5.5.35
0.03200101852417 0.02829909324646
Output for 5.5.34
0.032370090484619 0.028314113616943
Output for 5.5.33
0.022748947143555 0.021423816680908
Output for 5.5.32
0.030055999755859 0.026832103729248
Output for 5.5.31
0.031092882156372 0.027872085571289
Output for 5.5.30
0.031217098236084 0.027711153030396
Output for 5.5.29
0.031369924545288 0.027224063873291
Output for 5.5.28
0.029443025588989 0.026599884033203
Output for 5.5.27
0.030019998550415 0.026940107345581
Output for 5.5.26
0.028428792953491 0.025057077407837
Output for 5.5.25
0.032153129577637 0.028536081314087
Output for 5.5.24
0.032252073287964 0.028572082519531
Output for 5.5.23
0.028972148895264 0.025678157806396
Output for 5.5.22
0.024055004119873 0.022579908370972
Output for 5.5.21
0.033155918121338 0.028993129730225
Output for 5.5.20
0.031852006912231 0.028230905532837
Output for 5.5.19
0.030414819717407 0.030780076980591
Output for 5.5.18
0.033163070678711 0.029214859008789
Output for 5.5.16
0.033028841018677 0.028342962265015
Output for 5.5.15
0.027144908905029 0.024677991867065
Output for 5.5.14
0.033336162567139 0.029109954833984
Output for 5.5.13
0.033792018890381 0.029309988021851
Output for 5.5.12
0.021493911743164 0.021596193313599
Output for 5.5.11
0.029632806777954 0.026312112808228
Output for 5.5.10
0.030817031860352 0.027680158615112
Output for 5.5.9
0.021638870239258 0.021651983261108
Output for 5.5.8
0.021469831466675 0.021638870239258
Output for 5.5.7
0.021584033966064 0.02169394493103
Output for 5.5.6
0.017894983291626 0.017804861068726
Output for 5.5.5
0.018020153045654 0.017786026000977
Output for 5.5.4
0.018917083740234 0.018110036849976
Output for 5.5.3
0.017683029174805 0.019997119903564
Output for 5.5.2
0.018139123916626 0.018415927886963
Output for 5.5.1
0.020244836807251 0.019968032836914
Output for 5.5.0
0.018295049667358 0.01812219619751
Output for 5.4.45
0.029172897338867 0.026262044906616
Output for 5.4.44
0.031564950942993 0.027904987335205
Output for 5.4.43
0.032347917556763 0.028507947921753
Output for 5.4.42
0.029736042022705 0.02678918838501
Output for 5.4.41
0.028533935546875 0.027159929275513
Output for 5.4.40
0.033354997634888 0.029644012451172
Output for 5.4.39
0.030560970306396 0.026317119598389
Output for 5.4.38
0.025348901748657 0.023283958435059
Output for 5.4.37
0.031773090362549 0.028316020965576
Output for 5.4.36
0.033297777175903 0.029115915298462
Output for 5.4.35
0.032409906387329 0.02906608581543
Output for 5.4.34
0.033447980880737 0.024255990982056
Output for 5.4.32
0.033282041549683 0.02920389175415
Output for 5.4.31
0.032762765884399 0.028398990631104
Output for 5.4.30
0.030066013336182 0.026914834976196
Output for 5.4.29
0.023844957351685 0.023310899734497
Output for 5.4.28
0.031301975250244 0.027688980102539
Output for 5.4.27
0.032638072967529 0.028638124465942
Output for 5.4.26
0.023478984832764 0.022203922271729
Output for 5.4.25
0.022157192230225 0.022101163864136
Output for 5.4.24
0.023005962371826 0.022992849349976
Output for 5.4.23
0.022277116775513 0.020651817321777
Output for 5.4.22
0.023764133453369 0.022159814834595
Output for 5.4.21
0.022242069244385 0.023032903671265
Output for 5.4.20
0.017989873886108 0.01799201965332
Output for 5.4.19
0.022727012634277 0.022755861282349
Output for 5.4.18
0.017654180526733 0.017721891403198
Output for 5.4.17
0.018090963363647 0.018209934234619
Output for 5.4.16
0.022042989730835 0.020591974258423
Output for 5.4.15
0.017551898956299 0.017832040786743
Output for 5.4.14
0.017554044723511 0.017578125
Output for 5.4.13
0.017651081085205 0.017739057540894
Output for 5.4.12
0.018465995788574 0.017591953277588
Output for 5.4.11
0.017666101455688 0.021968841552734
Output for 5.4.10
0.022377967834473 0.02210807800293
Output for 5.4.9
0.017695903778076 0.017839908599854
Output for 5.4.8
0.033285140991211 0.029171943664551
Output for 5.4.7
0.033015966415405 0.028990983963013
Output for 5.4.6
0.034348011016846 0.030162811279297
Output for 5.4.5
0.030380964279175 0.026458024978638
Output for 5.4.4
0.030422925949097 0.027161121368408
Output for 5.4.3
0.031404972076416 0.027868986129761
Output for 5.4.2
0.033861875534058 0.029479026794434
Output for 5.4.1
0.034235954284668 0.031985998153687
Output for 5.4.0
0.030129909515381 0.026648998260498
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/QpKPF on line 18
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/QpKPF on line 18
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/QpKPF on line 18
Process exited with code 255.