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"; $name = (new ReflectionClass($foo))->getName(); $start = microtime(true); for($i=0; $i<$rounds; $i++) { $name; } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $i++) { (new ReflectionClass($foo))->getName(); } echo (microtime(true) - $start);
Output for 7.1.0
0.06028413772583 0.011076927185059 0.27202606201172
Output for 7.0.14
0.074251174926758 0.025804042816162 0.21469593048096
Output for 7.0.7
0.054602861404419 0.0095410346984863 0.2801558971405
Output for 7.0.6
0.050745010375977 0.0096719264984131 0.27677798271179
Output for 7.0.5
0.048918962478638 0.0092859268188477 0.27251005172729
Output for 7.0.4
0.057826042175293 0.0097038745880127 0.26931309700012
Output for 7.0.3
0.060192108154297 0.0098350048065186 0.29637789726257
Output for 7.0.2
0.050404071807861 0.0089700222015381 0.27353811264038
Output for 7.0.1
0.048509120941162 0.0085639953613281 0.27649593353271
Output for 7.0.0
0.05831503868103 0.0092751979827881 0.28409099578857
Output for 5.6.28
0.16095399856567 0.021719932556152 0.40647387504578
Output for 5.6.22
0.10901498794556 0.02661395072937 0.55001091957092
Output for 5.6.21
0.10456085205078 0.021596908569336 0.57354617118835
Output for 5.6.20
0.1225118637085 0.021603107452393 0.55647397041321
Output for 5.6.19
0.10978698730469 0.021585941314697 0.55293393135071
Output for 5.6.18
0.12386918067932 0.022309064865112 0.58021593093872
Output for 5.6.17
0.15828394889832 0.025631189346313 0.55318093299866
Output for 5.6.16
0.12215685844421 0.021493911743164 0.5640070438385
Output for 5.6.15
0.10725402832031 0.022130012512207 0.53094220161438
Output for 5.6.14
0.11098885536194 0.024152040481567 0.54733395576477
Output for 5.6.13
0.12558913230896 0.023051977157593 0.47665596008301
Output for 5.6.12
0.12877202033997 0.022192001342773 0.55236792564392
Output for 5.6.11
0.11045980453491 0.021430969238281 0.62143492698669
Output for 5.6.10
0.10913491249084 0.021379232406616 0.55020403862
Output for 5.6.9
0.094943761825562 0.017632007598877 0.49603009223938
Output for 5.6.8
0.11253213882446 0.021574020385742 0.54263997077942
Output for 5.6.7
0.097665071487427 0.021545886993408 0.4695200920105
Output for 5.6.6
0.11991715431213 0.021988153457642 0.54932403564453
Output for 5.6.5
0.13232493400574 0.024110078811646 0.55615997314453
Output for 5.6.4
0.13488507270813 0.0228431224823 0.56486105918884
Output for 5.6.3
0.11981391906738 0.022161960601807 0.56749701499939
Output for 5.6.2
0.12633490562439 0.022358894348145 0.54610013961792
Output for 5.6.1
0.099057912826538 0.021594047546387 0.49780511856079
Output for 5.6.0
0.10146188735962 0.019542217254639 0.44971609115601
Output for 5.5.36
0.13506388664246 0.02489185333252 0.57063007354736
Output for 5.5.35
0.1355128288269 0.022171974182129 0.58245611190796
Output for 5.5.34
0.11958384513855 0.02180290222168 0.5618691444397
Output for 5.5.33
0.12412595748901 0.021601915359497 0.5646960735321
Output for 5.5.32
0.10702395439148 0.022050857543945 0.49754786491394
Output for 5.5.31
0.1273410320282 0.022125005722046 0.56378984451294
Output for 5.5.30
0.090070962905884 0.017653942108154 0.46247100830078
Output for 5.5.29
0.10570883750916 0.021644830703735 0.53641486167908
Output for 5.5.28
0.12720012664795 0.021558046340942 0.55987501144409
Output for 5.5.27
0.12849402427673 0.021578073501587 0.55799913406372
Output for 5.5.26
0.10351085662842 0.022799968719482 0.51357698440552
Output for 5.5.25
0.09992790222168 0.021397829055786 0.48998594284058
Output for 5.5.24
0.13157796859741 0.023360013961792 0.55341815948486
Output for 5.5.23
0.10911893844604 0.019112110137939 0.45905995368958
Output for 5.5.22
0.12893104553223 0.024296998977661 0.56894898414612
Output for 5.5.21
0.11435699462891 0.021376848220825 0.59694194793701
Output for 5.5.20
0.12678003311157 0.022659063339233 0.56921291351318
Output for 5.5.19
0.12443494796753 0.021421194076538 0.565425157547
Output for 5.5.18
0.11801695823669 0.025617122650146 0.58419108390808
Output for 5.5.16
0.082659006118774 0.017778873443604 0.45869088172913
Output for 5.5.15
0.15347695350647 0.030647993087769 0.64449596405029
Output for 5.5.14
0.10934519767761 0.020479917526245 0.4630389213562
Output for 5.5.13
0.099548101425171 0.017952919006348 0.45808410644531
Output for 5.5.12
0.10486817359924 0.021382093429565 0.5443708896637
Output for 5.5.11
0.11001992225647 0.021414995193481 0.5568540096283
Output for 5.5.10
0.11140298843384 0.021414041519165 0.56136202812195
Output for 5.5.9
0.13064503669739 0.019828081130981 0.46208095550537
Output for 5.5.8
0.11875414848328 0.021589040756226 0.56576490402222
Output for 5.5.7
0.12962317466736 0.021716833114624 0.5649299621582
Output for 5.5.6
0.11375784873962 0.021564960479736 0.56357789039612
Output for 5.5.5
0.10733103752136 0.025302171707153 0.49118995666504
Output for 5.5.4
0.12252283096313 0.021398067474365 0.58262491226196
Output for 5.5.3
0.12846684455872 0.02170205116272 0.56192898750305
Output for 5.5.2
0.13945293426514 0.023354053497314 0.56704211235046
Output for 5.5.1
0.089906930923462 0.017759084701538 0.46175694465637
Output for 5.5.0
0.145840883255 0.023004055023193 0.58635306358337
Output for 5.4.45
0.12481594085693 0.023011922836304 0.53899192810059
Output for 5.4.44
0.10149502754211 0.027125835418701 0.53682994842529
Output for 5.4.43
0.12085390090942 0.022179841995239 0.56022787094116
Output for 5.4.42
0.13521814346313 0.024014949798584 0.54497981071472
Output for 5.4.41
0.093175888061523 0.020867824554443 0.45401096343994
Output for 5.4.40
0.10068321228027 0.021899223327637 0.47994208335876
Output for 5.4.39
0.10431504249573 0.021879911422729 0.54162883758545
Output for 5.4.38
0.1124210357666 0.021981000900269 0.55281209945679
Output for 5.4.37
0.1333270072937 0.023820877075195 0.54215312004089
Output for 5.4.36
0.11969900131226 0.027599096298218 0.5706901550293
Output for 5.4.35
0.11073708534241 0.023165941238403 0.50382399559021
Output for 5.4.34
0.1098358631134 0.023195028305054 0.63207793235779
Output for 5.4.32
0.12392497062683 0.022779941558838 0.72857403755188
Output for 5.4.31
0.17568111419678 0.038106918334961 0.59504389762878
Output for 5.4.30
0.12405896186829 0.023515939712524 0.45873308181763
Output for 5.4.29
0.13015604019165 0.022755861282349 0.54731607437134
Output for 5.4.28
0.11239290237427 0.021878957748413 0.54680395126343
Output for 5.4.27
0.1282069683075 0.027769088745117 0.55480599403381
Output for 5.4.26
0.13603115081787 0.023516893386841 0.54509091377258
Output for 5.4.25
0.13559007644653 0.024228096008301 0.54876089096069
Output for 5.4.24
0.13326501846313 0.02297306060791 0.57251787185669
Output for 5.4.23
0.10402607917786 0.022520065307617 0.5692880153656
Output for 5.4.22
0.12436509132385 0.022063970565796 0.54304003715515
Output for 5.4.21
0.14463090896606 0.024035930633545 0.57309985160828
Output for 5.4.20
0.10124397277832 0.021950960159302 0.54585003852844
Output for 5.4.19
0.12931394577026 0.02375316619873 0.54313993453979
Output for 5.4.18
0.10977983474731 0.021975994110107 0.57215404510498
Output for 5.4.17
0.10617017745972 0.01885986328125 0.45177292823792
Output for 5.4.16
0.12480592727661 0.021914958953857 0.54059314727783
Output for 5.4.15
0.12207913398743 0.021852970123291 0.54264187812805
Output for 5.4.14
0.14513397216797 0.023430824279785 0.56179809570312
Output for 5.4.13
0.1265971660614 0.022166013717651 0.57516503334045
Output for 5.4.12
0.11507105827332 0.021732807159424 0.54779100418091
Output for 5.4.11
0.13576722145081 0.026494979858398 0.5454261302948
Output for 5.4.10
0.1296911239624 0.023159980773926 0.53963804244995
Output for 5.4.9
0.10604810714722 0.023378133773804 0.54383993148804
Output for 5.4.8
0.11129188537598 0.02344799041748 0.54599905014038
Output for 5.4.7
0.10386800765991 0.02326488494873 0.5396580696106
Output for 5.4.6
0.10738682746887 0.02392315864563 0.50657486915588
Output for 5.4.5
0.09634804725647 0.023277997970581 0.49144697189331
Output for 5.4.4
0.096458911895752 0.023240089416504 0.47514295578003
Output for 5.4.3
0.097151041030884 0.023323059082031 0.47888684272766
Output for 5.4.2
0.098989009857178 0.022739887237549 0.46309995651245
Output for 5.4.1
0.080011129379272 0.019169807434082 0.4441339969635
Output for 5.4.0
0.10083198547363 0.02157998085022 0.46170902252197
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/g53YX on line 17
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/g53YX on line 17
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/g53YX on line 17
Process exited with code 255.