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++) { $refl = new ReflectionProperty('Foo', 'bar'); $var = $refl->getValue($foo); } echo (microtime(true) - $start);
Output for 7.1.0
0.027514934539795 0.12209796905518 0.37804198265076
Output for 7.0.14
0.044514894485474 0.12274885177612 -0.20518279075623
Output for 7.0.8
0.01913595199585 0.090235948562622 0.36636805534363
Output for 7.0.7
0.017540216445923 0.09364914894104 0.42941904067993
Output for 7.0.6
0.014548063278198 0.090287923812866 0.37170314788818
Output for 7.0.5
0.015079975128174 0.094752073287964 0.38730621337891
Output for 7.0.4
0.019802093505859 0.090537071228027 0.36297607421875
Output for 7.0.3
0.018315076828003 0.10166001319885 0.40354704856873
Output for 7.0.2
0.027384996414185 0.13292193412781 0.43750214576721
Output for 7.0.1
0.025993824005127 0.1158721446991 0.46274900436401
Output for 7.0.0
0.02739691734314 0.11341595649719 0.44401097297668
Output for 5.6.28
0.062940835952759 0.21460890769958 -0.39570879936218
Output for 5.6.23
0.053903818130493 0.2001781463623 0.68041491508484
Output for 5.6.22
0.063264131546021 0.20701289176941 0.6988639831543
Output for 5.6.21
0.063796997070312 0.20199513435364 0.68468189239502
Output for 5.6.20
0.057507038116455 0.20938491821289 0.68424010276794
Output for 5.6.19
0.042556047439575 0.19848489761353 0.61859607696533
Output for 5.6.18
0.043251991271973 0.18140697479248 0.64107203483582
Output for 5.6.17
0.056653022766113 0.207200050354 0.70023107528687
Output for 5.6.16
0.048341035842896 0.20199799537659 0.6937050819397
Output for 5.6.15
0.035747051239014 0.1735999584198 0.61498212814331
Output for 5.6.14
0.053911924362183 0.20976209640503 0.70047211647034
Output for 5.6.13
0.042502880096436 0.19990205764771 0.60350918769836
Output for 5.6.12
0.043459892272949 0.17167210578918 0.6037609577179
Output for 5.6.11
0.033574104309082 0.16150999069214 0.5713038444519
Output for 5.6.10
0.05196213722229 0.18637585639954 0.5700900554657
Output for 5.6.9
0.061003923416138 0.20188689231873 0.69640803337097
Output for 5.6.8
0.044041872024536 0.19455981254578 0.67119693756104
Output for 5.6.7
0.061158895492554 0.20866894721985 0.69172787666321
Output for 5.6.6
0.06269907951355 0.22053503990173 0.72391295433044
Output for 5.6.5
0.051469087600708 0.20122885704041 0.67671608924866
Output for 5.6.4
0.054013967514038 0.2021918296814 0.69122290611267
Output for 5.6.3
0.06273889541626 0.22512292861938 0.77286982536316
Output for 5.6.2
0.044701099395752 0.1951858997345 0.67531609535217
Output for 5.6.1
0.041379928588867 0.16603899002075 0.59252500534058
Output for 5.6.0
0.04867696762085 0.17353510856628 0.58729982376099
Output for 5.5.37
0.059942007064819 0.21467781066895 0.72578811645508
Output for 5.5.36
0.055410146713257 0.21231603622437 0.69030904769897
Output for 5.5.35
0.052801132202148 0.20930409431458 0.70882201194763
Output for 5.5.34
0.057675123214722 0.23146200180054 0.77684903144836
Output for 5.5.33
0.061184167861938 0.21037602424622 0.70591282844543
Output for 5.5.32
0.052834987640381 0.20807003974915 0.71835088729858
Output for 5.5.31
0.056075096130371 0.21025800704956 0.71211910247803
Output for 5.5.30
0.036212921142578 0.18041610717773 0.68558406829834
Output for 5.5.29
0.041361093521118 0.18868088722229 0.60576820373535
Output for 5.5.28
0.053869009017944 0.2118399143219 0.69413995742798
Output for 5.5.27
0.049862146377563 0.16867208480835 0.60330200195312
Output for 5.5.26
0.060425996780396 0.21854996681213 0.72266983985901
Output for 5.5.25
0.057618856430054 0.22235798835754 0.75681495666504
Output for 5.5.24
0.064351081848145 0.21845602989197 0.70360493659973
Output for 5.5.23
0.0555419921875 0.24546790122986 0.70459413528442
Output for 5.5.22
0.065984010696411 0.21091198921204 0.69761800765991
Output for 5.5.21
0.059746980667114 0.20702791213989 0.71698689460754
Output for 5.5.20
0.052320003509521 0.20434093475342 0.69069194793701
Output for 5.5.19
0.052541971206665 0.20878505706787 0.70162796974182
Output for 5.5.18
0.063048839569092 0.21295499801636 0.6622040271759
Output for 5.5.16
0.035294055938721 0.16646814346313 0.61937999725342
Output for 5.5.15
0.066436052322388 0.23179221153259 0.71766686439514
Output for 5.5.14
0.03711986541748 0.18146300315857 0.62172102928162
Output for 5.5.13
0.065386056900024 0.23920798301697 0.71619200706482
Output for 5.5.12
0.066320896148682 0.20820879936218 0.69132590293884
Output for 5.5.11
0.042058944702148 0.1700451374054 0.58690309524536
Output for 5.5.10
0.047043800354004 0.20388507843018 0.67104506492615
Output for 5.5.9
0.037210941314697 0.17137789726257 0.60425996780396
Output for 5.5.8
0.055525064468384 0.21137595176697 0.69876003265381
Output for 5.5.7
0.054746150970459 0.20344996452332 0.68714308738708
Output for 5.5.6
0.044947862625122 0.1762809753418 0.58700013160706
Output for 5.5.5
0.053931951522827 0.19527220726013 0.59529495239258
Output for 5.5.4
0.046340942382812 0.20645213127136 0.68357300758362
Output for 5.5.3
0.064866065979004 0.20738410949707 0.7030291557312
Output for 5.5.2
0.051732063293457 0.21005511283875 0.70826697349548
Output for 5.5.1
0.047768115997314 0.18123006820679 0.59683585166931
Output for 5.5.0
0.062108993530273 0.218013048172 0.70188212394714
Output for 5.4.45
0.047852993011475 0.17715811729431 0.6002299785614
Output for 5.4.44
0.03370213508606 0.16163897514343 0.5754120349884
Output for 5.4.43
0.03393292427063 0.16443610191345 0.58348798751831
Output for 5.4.42
0.060997009277344 0.20063996315002 0.57866597175598
Output for 5.4.41
0.057279825210571 0.22185277938843 0.75546598434448
Output for 5.4.40
0.063277959823608 0.21309304237366 0.69762802124023
Output for 5.4.39
0.055104970932007 0.2025899887085 0.68700098991394
Output for 5.4.38
0.063002109527588 0.18835783004761 0.61822700500488
Output for 5.4.37
0.064338207244873 0.21452403068542 0.69332909584045
Output for 5.4.36
0.062357902526855 0.21199202537537 0.68603014945984
Output for 5.4.35
0.060681104660034 0.21448087692261 0.74698710441589
Output for 5.4.34
0.054905891418457 0.20175790786743 0.69670081138611
Output for 5.4.32
0.03832483291626 0.16155481338501 0.57676291465759
Output for 5.4.31
0.042613983154297 0.16894388198853 0.57518291473389
Output for 5.4.30
0.050230979919434 0.18399000167847 0.57064700126648
Output for 5.4.29
0.033715009689331 0.16187500953674 0.57623910903931
Output for 5.4.28
0.056521892547607 0.20470809936523 0.68813705444336
Output for 5.4.27
0.041074991226196 0.19495296478271 0.62856698036194
Output for 5.4.26
0.064129829406738 0.21293997764587 0.69456791877747
Output for 5.4.25
0.042649984359741 0.19618892669678 0.58740401268005
Output for 5.4.24
0.034329175949097 0.16439390182495 0.56850600242615
Output for 5.4.23
0.060816049575806 0.19883608818054 0.67710614204407
Output for 5.4.22
0.043644905090332 0.17294192314148 0.57440400123596
Output for 5.4.21
0.047805070877075 0.18031811714172 0.57726407051086
Output for 5.4.20
0.048788070678711 0.19911289215088 0.67390608787537
Output for 5.4.19
0.062188148498535 0.21208000183105 0.68935012817383
Output for 5.4.18
0.033921003341675 0.16272616386414 0.56783604621887
Output for 5.4.17
0.055051803588867 0.2057728767395 0.69293594360352
Output for 5.4.16
0.040651798248291 0.1662290096283 0.56923818588257
Output for 5.4.15
0.051973819732666 0.19298791885376 0.61196208000183
Output for 5.4.14
0.064218997955322 0.21530604362488 0.7021598815918
Output for 5.4.13
0.040541172027588 0.19058203697205 0.57505393028259
Output for 5.4.12
0.043483972549438 0.17172312736511 0.57759380340576
Output for 5.4.11
0.039493083953857 0.1667308807373 0.57983088493347
Output for 5.4.10
0.063507080078125 0.21034908294678 0.68974804878235
Output for 5.4.9
0.061142921447754 0.19984889030457 0.69491004943848
Output for 5.4.8
0.061338901519775 0.19674491882324 0.6814558506012
Output for 5.4.7
0.064469814300537 0.22636103630066 0.71445393562317
Output for 5.4.6
0.050626039505005 0.18217396736145 0.57503890991211
Output for 5.4.5
0.055434942245483 0.19754600524902 0.6688392162323
Output for 5.4.4
0.060758829116821 0.20969486236572 0.68990683555603
Output for 5.4.3
0.067074060440063 0.21672010421753 0.72685384750366
Output for 5.4.2
0.05794882774353 0.20283484458923 0.67961406707764
Output for 5.4.1
0.035669803619385 0.18618202209473 0.6470320224762
Output for 5.4.0
0.043164014816284 0.20014715194702 0.65681099891663
Output for 5.3.29
0.092748880386353 0.21952891349792 0.74467420578003
Output for 5.3.28
0.056692123413086 0.21708607673645 0.759526014328
Output for 5.3.27
0.054281949996948 0.20841121673584 0.7393171787262
Output for 5.3.26
0.088887929916382 0.25335788726807 0.81698799133301
Output for 5.3.25
0.079917907714844 0.26873707771301 0.8288300037384
Output for 5.3.24
0.071416854858398 0.2548041343689 0.81556606292725
Output for 5.3.23
0.069977998733521 0.21505689620972 0.72467494010925
Output for 5.3.22
0.066416025161743 0.2138090133667 0.72678399085999
Output for 5.3.21
0.091572999954224 0.25398898124695 0.81673693656921
Output for 5.3.20
0.083949089050293 0.22463202476501 0.72694706916809
Output for 5.3.19
0.080905914306641 0.25314712524414 0.8105788230896
Output for 5.3.18
0.099640130996704 0.25767683982849 0.82283210754395
Output for 5.3.17
0.059455871582031 0.20308589935303 0.73331499099731
Output for 5.3.16
0.074770212173462 0.21449303627014 0.71903395652771
Output for 5.3.15
0.076849937438965 0.21286201477051 0.71821188926697
Output for 5.3.14
0.088458061218262 0.27136015892029 0.81926703453064
Output for 5.3.13
0.089231014251709 0.25181484222412 0.77880215644836
Output for 5.3.12
0.095557928085327 0.2567150592804 0.79525208473206
Output for 5.3.11
0.084727048873901 0.24598979949951 0.6906270980835
Output for 5.3.10
0.1035430431366 0.26187896728516 0.81498694419861
Output for 5.3.9
0.063493013381958 0.2164580821991 0.73817706108093
Output for 5.3.8
0.071952104568481 0.25523209571838 0.69899821281433
Output for 5.3.7
0.091071844100952 0.25177597999573 0.77829694747925
Output for 5.3.6
0.086009979248047 0.25559115409851 0.79521298408508
Output for 5.3.5
0.056309938430786 0.20791292190552 0.72482919692993
Output for 5.3.4
0.087399005889893 0.25777316093445 0.78796100616455
Output for 5.3.3
0.10670113563538 0.27778792381287 0.79820489883423
Output for 5.3.2
0.055623054504395 0.20423603057861 0.6746289730072
Output for 5.3.1
0.10163116455078 0.26013898849487 0.79778909683228
Output for 5.3.0
0.097303867340088 0.25161194801331 0.80471801757812
Output for 5.2.17
0.098175048828125 0.26260185241699 0.73147201538086
Output for 5.2.16
0.13184285163879 0.26502919197083 0.77780890464783
Output for 5.2.15
0.10173320770264 0.21806597709656 0.67059707641602
Output for 5.2.14
0.10655999183655 0.26017880439758 0.76051712036133
Output for 5.2.13
0.12218999862671 0.27798700332642 0.79744815826416
Output for 5.2.12
0.1178879737854 0.23894596099854 0.72654986381531
Output for 5.2.11
0.099385023117065 0.21851301193237 0.66279101371765
Output for 5.2.10
0.071502923965454 0.21517300605774 0.67425394058228
Output for 5.2.9
0.12313413619995 0.30165481567383 0.825679063797
Output for 5.2.8
0.11949110031128 0.26523900032043 0.7624990940094
Output for 5.2.7
0.12622499465942 0.24297904968262 0.71019792556763
Output for 5.2.6
0.11530900001526 0.26215291023254 0.78164887428284
Output for 5.2.5
0.089560031890869 0.22351408004761 0.663498878479
Output for 5.2.4
0.11182594299316 0.26507902145386 0.75087976455688
Output for 5.2.3
0.12161207199097 0.26659393310547 0.77125000953674
Output for 5.2.2
0.12702202796936 0.26375198364258 0.77925419807434
Output for 5.2.1
0.097831010818481 0.25122594833374 0.73517894744873
Output for 5.2.0
0.12488889694214 0.25875806808472 0.75704598426819
Output for 5.1.6
0.07203197479248 0.15899109840393 0.56916308403015
Output for 5.1.5
0.097595930099487 0.16665983200073 0.58838701248169
Output for 5.1.4
0.080857038497925 0.16073107719421 0.59556794166565
Output for 5.1.3
0.072463035583496 0.15872192382812 0.56828904151917
Output for 5.1.2
0.1213698387146 0.19368100166321 0.69284582138062
Output for 5.1.1
0.11709904670715 0.19922184944153 0.66206192970276
Output for 5.1.0
0.11153602600098 0.19534277915955 0.66282081604004
Output for 5.0.5
0.19465494155884 0.29491400718689 0.88296008110046
Output for 5.0.4
0.25306415557861 0.34238290786743 0.8621768951416
Output for 5.0.3
0.16689109802246 0.29452800750732 0.76347994804382
Output for 5.0.2
0.2325451374054 0.3268039226532 0.79918384552002
Output for 5.0.1
0.21299886703491 0.32771897315979 0.79230403900146
Output for 5.0.0
0.23382496833801 0.35305595397949 0.83035397529602
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/XiHeF 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/XiHeF 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/XiHeF on line 4
Process exited with code 255.