3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo {} $foo = new Foo; $rounds = 1000000; $start = microtime(true); for($i=0; $i<$rounds; $i++) { get_class($foo); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $i++) { (new ReflectionClass($foo))->getName(); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); $refl = new ReflectionClass($foo); for($i=0; $i<$rounds; $i++) { $refl->getName(); } echo (microtime(true) - $start);
Output for 7.1.0
0.058736801147461 0.22765803337097 -0.020385026931763
Output for 7.0.14
0.075314044952393 -0.14560103416443 -0.043805122375488
Output for 7.0.6
0.051013946533203 0.24335193634033 0.028543949127197
Output for 7.0.5
0.057164192199707 0.28958010673523 0.035067796707153
Output for 7.0.4
0.057448863983154 0.28578591346741 0.036505937576294
Output for 7.0.3
0.048771858215332 0.2746798992157 0.034597158432007
Output for 7.0.2
0.052962064743042 0.28034400939941 0.036670923233032
Output for 7.0.1
0.040341138839722 0.27851390838623 0.034968137741089
Output for 7.0.0
0.052719116210938 0.27980399131775 0.033986806869507
Output for hhvm-3.12.0
0.079934120178223 0.66391086578369 0.094807147979736
Output for hhvm-3.10.0
0.084371089935303 0.67812585830688 0.11742806434631
Output for 5.6.28
0.044451951980591 -0.40911793708801 -0.095470905303955
Output for 5.6.21
0.12497997283936 0.57343697547913 0.10290288925171
Output for 5.6.20
0.10583090782166 0.47212100028992 0.088042974472046
Output for 5.6.19
0.12204003334045 0.54814100265503 0.10423493385315
Output for 5.6.18
0.11579704284668 0.45637893676758 0.084442853927612
Output for 5.6.17
0.099159955978394 0.52621483802795 0.086597919464111
Output for 5.6.16
0.11963510513306 0.5548620223999 0.1013970375061
Output for 5.6.15
0.12852692604065 0.56721687316895 0.10767793655396
Output for 5.6.14
0.12143707275391 0.46921706199646 0.088602066040039
Output for 5.6.13
0.11777591705322 0.54824304580688 0.10572814941406
Output for 5.6.12
0.12767696380615 0.55352783203125 0.10405206680298
Output for 5.6.11
0.12224698066711 0.62587094306946 0.1007878780365
Output for 5.6.10
0.12104105949402 0.54634308815002 0.10060381889343
Output for 5.6.9
0.1192569732666 0.54754495620728 0.10581588745117
Output for 5.6.8
0.12247204780579 0.57516694068909 0.099313974380493
Output for 5.6.7
0.084663152694702 0.51659107208252 0.089576959609985
Output for 5.6.6
0.17027497291565 0.70189094543457 0.13893008232117
Output for 5.6.5
0.12540698051453 0.55532193183899 0.10071086883545
Output for 5.6.4
0.11884593963623 0.5507698059082 0.10280108451843
Output for 5.6.3
0.11390590667725 0.48550701141357 0.08695912361145
Output for 5.6.2
0.12927794456482 0.56685996055603 0.10639595985413
Output for 5.6.1
0.12102293968201 0.5475709438324 0.10371494293213
Output for 5.6.0
0.10262584686279 0.53510308265686 0.083991050720215
Output for 5.5.35
0.12789416313171 0.56172704696655 0.10289788246155
Output for 5.5.34
0.12101602554321 0.57418417930603 0.097452878952026
Output for 5.5.33
0.12882614135742 0.58438897132874 0.10485792160034
Output for 5.5.32
0.1269850730896 0.46773600578308 0.083846092224121
Output for 5.5.31
0.11768293380737 0.56310081481934 0.10044598579407
Output for 5.5.30
0.10747885704041 0.46464705467224 0.085136890411377
Output for 5.5.29
0.11680102348328 0.46407198905945 0.083761930465698
Output for 5.5.28
0.1329140663147 0.58368277549744 0.10644912719727
Output for 5.5.27
0.099879026412964 0.47844099998474 0.090928077697754
Output for 5.5.26
0.12699699401855 0.57806897163391 0.10576605796814
Output for 5.5.25
0.12746906280518 0.55510187149048 0.099035024642944
Output for 5.5.24
0.10953903198242 0.56703186035156 0.081138849258423
Output for 5.5.23
0.16779589653015 0.73615598678589 0.16774082183838
Output for 5.5.22
0.10057401657104 0.46122694015503 0.08343505859375
Output for 5.5.21
0.13242602348328 0.55965495109558 0.098935127258301
Output for 5.5.20
0.13217401504517 0.56324911117554 0.10156607627869
Output for 5.5.19
0.13147902488708 0.56380796432495 0.1000280380249
Output for 5.5.18
0.12554502487183 0.58450698852539 0.10174202919006
Output for 5.5.16
0.12062501907349 0.57341003417969 0.10171008110046
Output for 5.5.15
0.11825299263 0.55624985694885 0.099829912185669
Output for 5.5.14
0.083652019500732 0.46272087097168 0.083252191543579
Output for 5.5.13
0.12035298347473 0.55678176879883 0.10300302505493
Output for 5.5.12
0.12717700004578 0.55191707611084 0.1037380695343
Output for 5.5.11
0.12690401077271 0.5758740901947 0.10123920440674
Output for 5.5.10
0.10372090339661 0.52978301048279 0.081725120544434
Output for 5.5.9
0.124027967453 0.57787203788757 0.11328506469727
Output for 5.5.8
0.12812900543213 0.55893397331238 0.098444938659668
Output for 5.5.7
0.1296660900116 0.56346011161804 0.10167908668518
Output for 5.5.6
0.12746000289917 0.56467700004578 0.10529494285583
Output for 5.5.5
0.12796592712402 0.56659412384033 0.10153794288635
Output for 5.5.4
0.10512399673462 0.46039009094238 0.083055019378662
Output for 5.5.3
0.10494804382324 0.45852994918823 0.081130027770996
Output for 5.5.2
0.12096214294434 0.56421709060669 0.10079503059387
Output for 5.5.1
0.10642886161804 0.55511808395386 0.083967924118042
Output for 5.5.0
0.11807584762573 0.56346607208252 0.09922194480896
Output for 5.4.45
0.12508797645569 0.54339599609375 0.10042309761047
Output for 5.4.44
0.12470698356628 0.54405307769775 0.098702192306519
Output for 5.4.43
0.12696409225464 0.55042910575867 0.10219502449036
Output for 5.4.42
0.12387800216675 0.54101896286011 0.099439859390259
Output for 5.4.41
0.12376308441162 0.55097603797913 0.10038495063782
Output for 5.4.40
0.097172975540161 0.46567010879517 0.082163095474243
Output for 5.4.39
0.11935186386108 0.47904181480408 0.081815004348755
Output for 5.4.38
0.098567008972168 0.46043086051941 0.085800886154175
Output for 5.4.37
0.11913299560547 0.57343196868896 0.10354495048523
Output for 5.4.36
0.13052916526794 0.55988311767578 0.10367798805237
Output for 5.4.35
0.11011099815369 0.57446599006653 0.091391801834106
Output for 5.4.34
0.10876798629761 0.54324102401733 0.099310874938965
Output for 5.4.32
0.084287881851196 0.45720386505127 0.082915067672729
Output for 5.4.31
0.12539792060852 0.54737496376038 0.099769115447998
Output for 5.4.30
0.11871790885925 0.53747296333313 0.098776817321777
Output for 5.4.29
0.12631702423096 0.55050706863403 0.10289597511292
Output for 5.4.28
0.12109088897705 0.56093311309814 0.10409498214722
Output for 5.4.27
0.1190710067749 0.5377368927002 0.10263013839722
Output for 5.4.26
0.09077000617981 0.44514513015747 0.088809013366699
Output for 5.4.25
0.12734198570251 0.54897499084473 0.10395216941833
Output for 5.4.24
0.12187504768372 0.54278707504272 0.10122585296631
Output for 5.4.23
0.10902500152588 0.54113006591797 0.099420070648193
Output for 5.4.22
0.13104486465454 0.54207992553711 0.10427498817444
Output for 5.4.21
0.1312198638916 0.54588007926941 0.10645699501038
Output for 5.4.20
0.10974097251892 0.55087304115295 0.10356402397156
Output for 5.4.19
0.12518811225891 0.54243206977844 0.1017689704895
Output for 5.4.18
0.12072491645813 0.45195078849792 0.087980985641479
Output for 5.4.17
0.12296795845032 0.54720902442932 0.10211396217346
Output for 5.4.16
0.20610404014587 0.687087059021 0.084604978561401
Output for 5.4.15
0.12515306472778 0.53575992584229 0.10016393661499
Output for 5.4.14
0.11543607711792 0.54161906242371 0.10032200813293
Output for 5.4.13
0.13238906860352 0.58048820495605 0.10670495033264
Output for 5.4.12
0.1201479434967 0.54418087005615 0.10345506668091
Output for 5.4.11
0.11516785621643 0.55640387535095 0.10059499740601
Output for 5.4.10
0.12649917602539 0.54469680786133 0.10756897926331
Output for 5.4.9
0.11346507072449 0.55150389671326 0.092433929443359
Output for 5.4.8
0.097790956497192 0.48868012428284 0.095784902572632
Output for 5.4.7
0.10291981697083 0.79760003089905 0.1689760684967
Output for 5.4.6
0.084539890289307 0.49830293655396 0.085184097290039
Output for 5.4.5
0.079365968704224 0.44837188720703 0.082850217819214
Output for 5.4.4
0.083264827728271 0.44925999641418 0.084239959716797
Output for 5.4.3
0.12693905830383 0.47790908813477 0.083769083023071
Output for 5.4.2
0.12503480911255 0.46101093292236 0.082508087158203
Output for 5.4.1
0.10609698295593 0.54328393936157 0.10116505622864
Output for 5.4.0
0.12000703811646 0.54053401947021 0.091227054595947
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/7Fkg0 on line 19
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/7Fkg0 on line 19
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/7Fkg0 on line 19
Process exited with code 255.