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"; $reflectionClass = new ReflectionClass($foo); $start = microtime(true); for($i=0; $i<$rounds; $i++) { $reflectionClass->getName(); } 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.050230979919434 0.040541887283325 0.2099289894104
Output for 7.0.14
0.073515892028809 0.057774066925049 0.2971179485321
Output for 7.0.7
0.037032127380371 0.035286903381348 0.27184987068176
Output for 7.0.6
0.052143812179565 0.034821033477783 0.27293109893799
Output for 7.0.5
0.051578998565674 0.04000186920166 0.27234196662903
Output for 7.0.4
0.037888050079346 0.034224033355713 0.25197410583496
Output for 7.0.3
0.041080951690674 0.034546136856079 0.27218794822693
Output for 7.0.2
0.045775890350342 0.034214019775391 0.2685010433197
Output for 7.0.1
0.048337936401367 0.038244009017944 0.27206301689148
Output for 7.0.0
0.046844005584717 0.037374019622803 0.29133796691895
Output for 5.6.28
0.18046498298645 0.10197496414185 0.41191291809082
Output for 5.6.21
0.13998317718506 0.12652611732483 0.65035319328308
Output for 5.6.20
0.10554504394531 0.10352206230164 0.54337787628174
Output for 5.6.19
0.11563801765442 0.10513997077942 0.4587299823761
Output for 5.6.18
0.10208010673523 0.10592794418335 0.45340514183044
Output for 5.6.17
0.1128888130188 0.1116189956665 0.55702185630798
Output for 5.6.16
0.12255001068115 0.10255599021912 0.55177807807922
Output for 5.6.15
0.12361979484558 0.10235190391541 0.55291485786438
Output for 5.6.14
0.12265801429749 0.10538101196289 0.5461630821228
Output for 5.6.13
0.1236469745636 0.10578608512878 0.55213403701782
Output for 5.6.12
0.11619710922241 0.10407400131226 0.55625510215759
Output for 5.6.11
0.12706303596497 0.10398602485657 0.61876583099365
Output for 5.6.10
0.10975503921509 0.10475277900696 0.55656790733337
Output for 5.6.9
0.10588884353638 0.099235057830811 0.53417181968689
Output for 5.6.8
0.12576103210449 0.11449599266052 0.5960910320282
Output for 5.6.7
0.10541605949402 0.101637840271 0.53988194465637
Output for 5.5.35
0.1309700012207 0.1100070476532 0.56360483169556
Output for 5.5.34
0.11763000488281 0.10278010368347 0.56355500221252
Output for 5.5.33
0.12345314025879 0.10170793533325 0.47985410690308
Output for 5.5.32
0.13077402114868 0.10161089897156 0.4529230594635
Output for 5.5.31
0.13976383209229 0.1332540512085 0.69813108444214
Output for 5.5.30
0.12426519393921 0.10483598709106 0.56896805763245
Output for 5.5.29
0.12438201904297 0.12304997444153 0.68902778625488
Output for 5.5.28
0.11471700668335 0.10398483276367 0.56336307525635
Output for 5.5.27
0.11049103736877 0.10867381095886 0.55565094947815
Output for 5.5.26
0.13055109977722 0.11817693710327 0.55917501449585
Output for 5.5.25
0.13532400131226 0.10761785507202 0.60443520545959
Output for 5.5.24
0.10228776931763 0.095804929733276 0.55763816833496
Output for 5.4.45
0.11609101295471 0.1010479927063 0.44069409370422
Output for 5.4.44
0.10904407501221 0.098647117614746 0.4423680305481
Output for 5.4.43
0.11772012710571 0.1020200252533 0.48773789405823
Output for 5.4.42
0.099537134170532 0.10056900978088 0.43801784515381
Output for 5.4.41
0.11034083366394 0.10111689567566 0.44635200500488
Output for 5.4.40
0.11591506004333 0.10215616226196 0.45004320144653
Output for 5.4.39
0.097382068634033 0.096482992172241 0.42476201057434
Output for 5.4.38
0.096702098846436 0.09937596321106 0.42520093917847
Output for 5.4.37
0.11295413970947 0.10150980949402 0.46454691886902
Output for 5.4.36
0.11156702041626 0.10107493400574 0.44602584838867
Output for 5.4.35
0.12214708328247 0.10198903083801 0.44698286056519
Output for 5.4.34
0.10446500778198 0.10026502609253 0.43961811065674
Output for 5.4.32
0.11023902893066 0.098728895187378 0.44429612159729
Output for 5.4.31
0.15963912010193 0.13977599143982 0.48263788223267
Output for 5.4.30
0.11110496520996 0.099313974380493 0.44259715080261
Output for 5.4.29
0.12330985069275 0.10419702529907 0.45227885246277
Output for 5.4.28
0.11066699028015 0.10598182678223 0.45180511474609
Output for 5.4.27
0.10565209388733 0.10602617263794 0.44338393211365
Output for 5.4.26
0.096687078475952 0.10150480270386 0.43093681335449
Output for 5.4.25
0.096230983734131 0.098484039306641 0.43940901756287
Output for 5.4.24
0.09638500213623 0.09972095489502 0.43436622619629
Output for 5.4.23
0.11844182014465 0.1146719455719 0.48252105712891
Output for 5.4.22
0.1165771484375 0.10537910461426 0.4766640663147
Output for 5.4.21
0.12448215484619 0.11610698699951 0.48908185958862
Output for 5.4.20
0.11533999443054 0.10430288314819 0.45361518859863
Output for 5.4.19
0.097976207733154 0.10451889038086 0.44718503952026
Output for 5.4.18
0.12103605270386 0.10314798355103 0.44363594055176
Output for 5.4.17
0.11986994743347 0.11370396614075 0.49799704551697
Output for 5.4.16
0.12026190757751 0.10261392593384 0.44432902336121
Output for 5.4.15
0.10941600799561 0.10209608078003 0.43602991104126
Output for 5.4.14
0.10737085342407 0.10125112533569 0.46112585067749
Output for 5.4.13
0.11808395385742 0.10619306564331 0.46952605247498
Output for 5.4.12
0.10996508598328 0.1184229850769 0.50138092041016
Output for 5.4.11
0.12791085243225 0.12961006164551 0.47782611846924
Output for 5.4.10
0.1266508102417 0.12005090713501 0.46594309806824
Output for 5.4.9
0.11993193626404 0.10107398033142 0.46522402763367
Output for 5.4.8
0.1138870716095 0.10309100151062 0.44246697425842
Output for 5.4.7
0.12019395828247 0.11239099502563 0.48948812484741
Output for 5.4.6
0.11988186836243 0.10181498527527 0.4390869140625
Output for 5.4.5
0.11527395248413 0.1011381149292 0.4388689994812
Output for 5.4.4
0.098733186721802 0.10309720039368 0.44244909286499
Output for 5.4.3
0.10181212425232 0.10270619392395 0.43940591812134
Output for 5.4.2
0.1149570941925 0.10155320167542 0.44601392745972
Output for 5.4.1
0.1040370464325 0.103031873703 0.43977189064026
Output for 5.4.0
0.099114179611206 0.10063505172729 0.43131899833679
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/33CgB on line 28
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/33CgB on line 28
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/33CgB on line 28
Process exited with code 255.