3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public $bar = 'bar'; } $foo = new Foo; $rounds = 1000000; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $var = $foo->bar; } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); $refl = new ReflectionProperty('Foo', 'bar'); for($i=0; $i<$rounds; $i++) { $var = $refl->getValue($foo); } echo (microtime(true) - $start); echo "\n"; $start = microtime(true); for($i=0; $i<$rounds; $i++) { $var = (new ReflectionProperty('Foo', 'bar'))->getValue($foo); } echo (microtime(true) - $start);
Output for 7.1.0
0.027680158615112 0.12099289894104 -0.60979604721069
Output for 7.0.14
0.047479867935181 0.1224479675293 0.35619711875916
Output for 7.0.12
0.026898145675659 0.13524198532104 0.38498997688293
Output for 7.0.8
0.026341915130615 0.10009503364563 0.42251396179199
Output for 7.0.7
0.01446795463562 0.074788808822632 0.36059498786926
Output for 7.0.6
0.02025294303894 0.10261607170105 0.44284605979919
Output for 7.0.5
0.023967027664185 0.12239193916321 0.43345212936401
Output for 7.0.4
0.032027006149292 0.11694097518921 0.43618416786194
Output for 7.0.3
0.022943019866943 0.11938810348511 0.43934893608093
Output for 7.0.2
0.017228126525879 0.10030007362366 0.3589198589325
Output for 7.0.1
0.016684055328369 0.10215592384338 0.41232514381409
Output for 7.0.0
0.017055034637451 0.10749888420105 0.41666889190674
Output for hhvm-3.12.0
0.071513891220093 0.60772180557251 1.2248501777649
Output for hhvm-3.10.0
0.071990013122559 0.59851503372192 1.5076429843903
Output for 5.6.28
0.042846918106079 -0.35053896903992 0.98679399490356
Output for 5.6.23
0.037689924240112 0.16330599784851 0.56987500190735
Output for 5.6.22
0.033511161804199 0.16188192367554 0.58767604827881
Output for 5.6.21
0.049432992935181 0.2005729675293 0.66946196556091
Output for 5.6.20
0.053808927536011 0.2274751663208 0.75686001777649
Output for 5.6.19
0.057242870330811 0.24296903610229 0.75271797180176
Output for 5.6.18
0.046036958694458 0.19801497459412 0.6517059803009
Output for 5.6.17
0.050146102905273 0.20137310028076 0.6638400554657
Output for 5.6.16
0.040884017944336 0.19094109535217 0.59357213973999
Output for 5.6.15
0.043245077133179 0.17633104324341 0.59066009521484
Output for 5.6.14
0.06119179725647 0.21334910392761 0.67535495758057
Output for 5.6.13
0.060462951660156 0.214595079422 0.69753193855286
Output for 5.6.12
0.062656164169312 0.21516299247742 0.70286917686462
Output for 5.6.11
0.04178786277771 0.19930505752563 0.59998393058777
Output for 5.6.10
0.054581880569458 0.20317411422729 0.68037891387939
Output for 5.6.9
0.058295011520386 0.2115490436554 0.69257807731628
Output for 5.6.8
0.04924201965332 0.19542908668518 0.67394804954529
Output for 5.6.7
0.045441150665283 0.19423007965088 0.63272905349731
Output for 5.6.6
0.043510913848877 0.20320200920105 0.63034796714783
Output for 5.6.5
0.054535865783691 0.21211290359497 0.66267514228821
Output for 5.6.4
0.050045013427734 0.19971108436584 0.66609716415405
Output for 5.6.3
0.052489995956421 0.21653413772583 0.72988986968994
Output for 5.6.2
0.067744970321655 0.20302391052246 0.73447585105896
Output for 5.6.1
0.060127019882202 0.22432112693787 0.69119191169739
Output for 5.6.0
0.047047853469849 0.17812705039978 0.58920502662659
Output for 5.5.37
0.050946950912476 0.20724105834961 0.69724988937378
Output for 5.5.36
0.048907995223999 0.20751190185547 0.6783230304718
Output for 5.5.35
0.048794984817505 0.20795512199402 0.68084907531738
Output for 5.5.34
0.048661947250366 0.2328679561615 0.68394804000854
Output for 5.5.33
0.041769981384277 0.2043080329895 0.59568786621094
Output for 5.5.32
0.039583921432495 0.17475199699402 0.67582702636719
Output for 5.5.31
0.034316062927246 0.16883492469788 0.59181714057922
Output for 5.5.30
0.044559955596924 0.2091429233551 0.70892000198364
Output for 5.5.29
0.064205884933472 0.21815299987793 0.71584391593933
Output for 5.5.28
0.060121059417725 0.21306896209717 0.69914984703064
Output for 5.5.27
0.072967052459717 0.25817608833313 0.70753598213196
Output for 5.5.26
0.056838989257812 0.21448421478271 0.69470000267029
Output for 5.5.25
0.042415142059326 0.20738506317139 0.6285388469696
Output for 5.5.24
0.065293073654175 0.21174311637878 0.67734384536743
Output for 5.5.23
0.06368088722229 0.22010922431946 0.70112299919128
Output for 5.5.22
0.062786817550659 0.2483229637146 0.77564907073975
Output for 5.5.21
0.042397022247314 0.20509910583496 0.64425206184387
Output for 5.5.20
0.038383007049561 0.16791820526123 0.57775497436523
Output for 5.5.19
0.056340932846069 0.1828179359436 0.65926504135132
Output for 5.5.18
0.054293155670166 0.2103099822998 0.66321706771851
Output for 5.5.16
0.054517984390259 0.23752403259277 0.80461621284485
Output for 5.5.15
0.05617094039917 0.21537113189697 0.6920759677887
Output for 5.5.14
0.052417993545532 0.20811104774475 0.69351387023926
Output for 5.5.13
0.035994052886963 0.1704249382019 0.58752107620239
Output for 5.5.12
0.04171895980835 0.1983790397644 0.58551406860352
Output for 5.5.11
0.044786930084229 0.20779204368591 0.59995985031128
Output for 5.5.10
0.04781699180603 0.20468592643738 0.66045188903809
Output for 5.5.9
0.042755126953125 0.17146801948547 0.58171510696411
Output for 5.5.8
0.06486701965332 0.23224496841431 0.69655609130859
Output for 5.5.7
0.049953937530518 0.2140040397644 0.67428708076477
Output for 5.5.6
0.06282901763916 0.21737885475159 0.69556903839111
Output for 5.5.5
0.049859046936035 0.21250104904175 0.68364381790161
Output for 5.5.4
0.050909996032715 0.21218800544739 0.67590308189392
Output for 5.5.3
0.050931930541992 0.18753695487976 0.5859899520874
Output for 5.5.2
0.055186986923218 0.22819709777832 0.71513795852661
Output for 5.5.1
0.056533813476562 0.21236801147461 0.68956398963928
Output for 5.5.0
0.042367935180664 0.17613291740417 0.58102607727051
Output for 5.4.45
0.05084490776062 0.17638206481934 0.5682418346405
Output for 5.4.44
0.050801038742065 0.19964194297791 0.67399501800537
Output for 5.4.43
0.064255952835083 0.24610996246338 0.71604800224304
Output for 5.4.42
0.050771951675415 0.20193195343018 0.72728395462036
Output for 5.4.41
0.060618877410889 0.22670102119446 0.73385691642761
Output for 5.4.40
0.03892707824707 0.16469311714172 0.56188082695007
Output for 5.4.39
0.046474933624268 0.19594502449036 0.64796209335327
Output for 5.4.38
0.048795938491821 0.19889187812805 0.65276098251343
Output for 5.4.37
0.060849189758301 0.20849585533142 0.68085908889771
Output for 5.4.36
0.054587125778198 0.20007801055908 0.68268203735352
Output for 5.4.35
0.057919979095459 0.20618581771851 0.68921995162964
Output for 5.4.34
0.05370306968689 0.20074915885925 0.67386293411255
Output for 5.4.32
0.049139022827148 0.19634103775024 0.66323280334473
Output for 5.4.31
0.036169052124023 0.16501307487488 0.57343006134033
Output for 5.4.30
0.034461975097656 0.17034006118774 0.58107686042786
Output for 5.4.29
0.04089617729187 0.19731497764587 0.58639287948608
Output for 5.4.28
0.041699886322021 0.19666409492493 0.62789702415466
Output for 5.4.27
0.044036865234375 0.19559597969055 0.579833984375
Output for 5.4.26
0.054474830627441 0.20066618919373 0.67638802528381
Output for 5.4.25
0.059029102325439 0.19957900047302 0.67201089859009
Output for 5.4.24
0.052354097366333 0.20143699645996 0.65475106239319
Output for 5.4.23
0.064059019088745 0.21303391456604 0.74552297592163
Output for 5.4.22
0.062191009521484 0.21521306037903 0.69081592559814
Output for 5.4.21
0.064779996871948 0.21648621559143 0.6939811706543
Output for 5.4.20
0.048837184906006 0.20144510269165 0.68364906311035
Output for 5.4.19
0.065002918243408 0.21209597587585 0.68413090705872
Output for 5.4.18
0.055214881896973 0.21659183502197 0.69757199287415
Output for 5.4.17
0.052427053451538 0.20114588737488 0.68692994117737
Output for 5.4.16
0.053129911422729 0.1992449760437 0.67589092254639
Output for 5.4.15
0.046792984008789 0.20283198356628 0.69571185112
Output for 5.4.14
0.063076019287109 0.215656042099 0.69532203674316
Output for 5.4.13
0.047965049743652 0.23660397529602 0.66379904747009
Output for 5.4.12
0.049607992172241 0.20971584320068 0.71843004226685
Output for 5.4.11
0.047798871994019 0.22865796089172 0.65384984016418
Output for 5.4.10
0.041280031204224 0.1986608505249 0.64147996902466
Output for 5.4.9
0.053024053573608 0.19602799415588 0.7230179309845
Output for 5.4.8
0.062777996063232 0.19783520698547 0.68350100517273
Output for 5.4.7
0.038289070129395 0.16478896141052 0.56905698776245
Output for 5.4.6
0.059448957443237 0.24687600135803 0.79362106323242
Output for 5.4.5
0.058988809585571 0.20263409614563 0.67873382568359
Output for 5.4.4
0.063039064407349 0.22991800308228 0.69980096817017
Output for 5.4.3
0.037925004959106 0.16162204742432 0.58047008514404
Output for 5.4.2
0.055210113525391 0.19885993003845 0.66165685653687
Output for 5.4.1
0.050729036331177 0.19835782051086 0.69620895385742
Output for 5.4.0
0.048922061920166 0.20192098617554 0.66113686561584
Output for 5.1.0 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/DkcMN on line 30
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_OBJECT_OPERATOR in /in/DkcMN on line 30
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/DkcMN on line 4
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_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/DkcMN on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/DkcMN on line 4
Process exited with code 255.