run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public $_field = "abcdefghijklmnopqrstuvwxyz"; public function __get($name) {} } class B { public $_field = "abcdefghijklmnopqrstuvwxyz"; } $a = new A; $start = microtime(true); for ($i = 0; $i < 100000; $i++) $field = $a->_field; $time_taken = microtime(true) - $start; echo 'With get: ' . $time_taken . 's' . PHP_EOL; $b = new B; $start = microtime(true); for ($i = 0; $i < 100000; $i++) $field = $b->_field; $time_taken = microtime(true) - $start; echo 'Without get: ' . $time_taken . 's' . PHP_EOL;
Output for 7.1.0RC3
With get: 0.0028960704803467s Without get: 0.0028800964355469s
Output for 7.0.12
With get: 0.0032901763916016s Without get: 0.002932071685791s
Output for 7.0.6
With get: 0.0026700496673584s Without get: 0.002593994140625s
Output for 7.0.5
With get: 0.0030210018157959s Without get: 0.0027549266815186s
Output for 7.0.4
With get: 0.0022938251495361s Without get: 0.0022299289703369s
Output for 7.0.3
With get: 0.0024511814117432s Without get: 0.0023880004882812s
Output for 7.0.2
With get: 0.0017728805541992s Without get: 0.0017850399017334s
Output for 7.0.1
With get: 0.002485990524292s Without get: 0.0025560855865479s
Output for 7.0.0
With get: 0.0028030872344971s Without get: 0.0028138160705566s
Output for hhvm-3.12.0
With get: 0.0069220066070557s Without get: 0.0068268775939941s
Output for hhvm-3.10.0
With get: 0.0090668201446533s Without get: 0.0088062286376953s
Output for 5.6.21
With get: 0.0062921047210693s Without get: 0.0062479972839355s
Output for 5.6.20
With get: 0.0045928955078125s Without get: 0.0046548843383789s
Output for 5.6.19
With get: 0.0040609836578369s Without get: 0.0040500164031982s
Output for 5.6.18
With get: 0.0064730644226074s Without get: 0.0057849884033203s
Output for 5.6.17
With get: 0.0060739517211914s Without get: 0.0059630870819092s
Output for 5.6.16
With get: 0.0060908794403076s Without get: 0.0058951377868652s
Output for 5.6.15
With get: 0.0063748359680176s Without get: 0.0060930252075195s
Output for 5.6.14
With get: 0.0064120292663574s Without get: 0.0059740543365479s
Output for 5.6.13
With get: 0.004047155380249s Without get: 0.0040938854217529s
Output for 5.6.12
With get: 0.0050020217895508s Without get: 0.0045669078826904s
Output for 5.6.11
With get: 0.0057380199432373s Without get: 0.0054261684417725s
Output for 5.6.10
With get: 0.004086971282959s Without get: 0.0041711330413818s
Output for 5.6.9
With get: 0.0063929557800293s Without get: 0.0062041282653809s
Output for 5.6.8
With get: 0.0041120052337646s Without get: 0.0040791034698486s
Output for 5.6.7
With get: 0.004166841506958s Without get: 0.0040521621704102s
Output for 5.6.6
With get: 0.0053369998931885s Without get: 0.0051610469818115s
Output for 5.6.5
With get: 0.006472110748291s Without get: 0.0063519477844238s
Output for 5.6.4
With get: 0.0066289901733398s Without get: 0.0063018798828125s
Output for 5.6.3
With get: 0.0056290626525879s Without get: 0.0054900646209717s
Output for 5.6.2
With get: 0.0056610107421875s Without get: 0.0055949687957764s
Output for 5.6.1
With get: 0.005964994430542s Without get: 0.0058140754699707s
Output for 5.6.0
With get: 0.0064070224761963s Without get: 0.0062131881713867s
Output for 5.5.35
With get: 0.0058219432830811s Without get: 0.0056588649749756s
Output for 5.5.34
With get: 0.006580114364624s Without get: 0.006195068359375s
Output for 5.5.33
With get: 0.0054640769958496s Without get: 0.0054788589477539s
Output for 5.5.32
With get: 0.004127025604248s Without get: 0.0042309761047363s
Output for 5.5.31
With get: 0.0062479972839355s Without get: 0.0061001777648926s
Output for 5.5.30
With get: 0.0058491230010986s Without get: 0.0057659149169922s
Output for 5.5.29
With get: 0.0056779384613037s Without get: 0.0054478645324707s
Output for 5.5.28
With get: 0.0066277980804443s Without get: 0.0064377784729004s
Output for 5.5.27
With get: 0.0062401294708252s Without get: 0.0059189796447754s
Output for 5.5.26
With get: 0.0062811374664307s Without get: 0.0061829090118408s
Output for 5.5.25
With get: 0.0064480304718018s Without get: 0.0062298774719238s
Output for 5.5.24
With get: 0.0062320232391357s Without get: 0.0064659118652344s
Output for 5.5.23
With get: 0.0063350200653076s Without get: 0.0062198638916016s
Output for 5.5.22
With get: 0.0066051483154297s Without get: 0.0062310695648193s
Output for 5.5.21
With get: 0.0057511329650879s Without get: 0.0058488845825195s
Output for 5.5.20
With get: 0.0062520503997803s Without get: 0.0061697959899902s
Output for 5.5.19
With get: 0.0057220458984375s Without get: 0.0058250427246094s
Output for 5.5.18
With get: 0.0078859329223633s Without get: 0.0078389644622803s
Output for 5.5.16
With get: 0.0047299861907959s Without get: 0.0047249794006348s
Output for 5.5.15
With get: 0.0045580863952637s Without get: 0.0043089389801025s
Output for 5.5.14
With get: 0.0042850971221924s Without get: 0.0042681694030762s
Output for 5.5.13
With get: 0.0040409564971924s Without get: 0.0042629241943359s
Output for 5.5.12
With get: 0.0044381618499756s Without get: 0.0042939186096191s
Output for 5.5.11
With get: 0.0046319961547852s Without get: 0.0042769908905029s
Output for 5.5.10
With get: 0.0043079853057861s Without get: 0.004256010055542s
Output for 5.5.9
With get: 0.0040130615234375s Without get: 0.0040240287780762s
Output for 5.5.8
With get: 0.0042800903320312s Without get: 0.0039980411529541s
Output for 5.5.7
With get: 0.0040149688720703s Without get: 0.0041031837463379s
Output for 5.5.6
With get: 0.0060429573059082s Without get: 0.0059618949890137s
Output for 5.5.5
With get: 0.0042579174041748s Without get: 0.0043129920959473s
Output for 5.5.4
With get: 0.0041351318359375s Without get: 0.0041148662567139s
Output for 5.5.3
With get: 0.0041229724884033s Without get: 0.0041871070861816s
Output for 5.5.2
With get: 0.0041329860687256s Without get: 0.0040881633758545s
Output for 5.5.1
With get: 0.0041100978851318s Without get: 0.0042018890380859s
Output for 5.5.0
With get: 0.0040960311889648s Without get: 0.0040559768676758s
Output for 5.4.45
With get: 0.0068399906158447s Without get: 0.0064461231231689s
Output for 5.4.44
With get: 0.0041429996490479s Without get: 0.0043659210205078s
Output for 5.4.43
With get: 0.0049099922180176s Without get: 0.0049240589141846s
Output for 5.4.42
With get: 0.0054512023925781s Without get: 0.0067839622497559s
Output for 5.4.41
With get: 0.0067448616027832s Without get: 0.0066218376159668s
Output for 5.4.40
With get: 0.0045831203460693s Without get: 0.0045449733734131s
Output for 5.4.39
With get: 0.0043339729309082s Without get: 0.0046350955963135s
Output for 5.4.38
With get: 0.0056159496307373s Without get: 0.0057699680328369s
Output for 5.4.37
With get: 0.0041539669036865s Without get: 0.0043621063232422s
Output for 5.4.36
With get: 0.006450891494751s Without get: 0.0063061714172363s
Output for 5.4.35
With get: 0.0065340995788574s Without get: 0.0063579082489014s
Output for 5.4.34
With get: 0.0045578479766846s Without get: 0.0041351318359375s
Output for 5.4.32
With get: 0.0067698955535889s Without get: 0.0062940120697021s
Output for 5.4.31
With get: 0.0041329860687256s Without get: 0.0041301250457764s
Output for 5.4.30
With get: 0.0044021606445312s Without get: 0.0047597885131836s
Output for 5.4.29
With get: 0.0041439533233643s Without get: 0.0041940212249756s
Output for 5.4.28
With get: 0.0041520595550537s Without get: 0.004133939743042s
Output for 5.4.27
With get: 0.0042779445648193s Without get: 0.0043380260467529s
Output for 5.4.26
With get: 0.0040609836578369s Without get: 0.0040228366851807s
Output for 5.4.25
With get: 0.0042760372161865s Without get: 0.004256010055542s
Output for 5.4.24
With get: 0.0045609474182129s Without get: 0.0048758983612061s
Output for 5.4.23
With get: 0.0040419101715088s Without get: 0.0043799877166748s
Output for 5.4.22
With get: 0.0041608810424805s Without get: 0.0043549537658691s
Output for 5.4.21
With get: 0.004619836807251s Without get: 0.0042190551757812s
Output for 5.4.20
With get: 0.004382848739624s Without get: 0.0043261051177979s
Output for 5.4.19
With get: 0.0041399002075195s Without get: 0.0041279792785645s
Output for 5.4.18
With get: 0.0044319629669189s Without get: 0.0045030117034912s
Output for 5.4.17
With get: 0.0040431022644043s Without get: 0.0040040016174316s
Output for 5.4.16
With get: 0.0051600933074951s Without get: 0.0051820278167725s
Output for 5.4.15
With get: 0.0049021244049072s Without get: 0.0050058364868164s
Output for 5.4.14
With get: 0.0040111541748047s Without get: 0.0039920806884766s
Output for 5.4.13
With get: 0.0039968490600586s Without get: 0.0040030479431152s
Output for 5.4.12
With get: 0.0042209625244141s Without get: 0.0042960643768311s
Output for 5.4.11
With get: 0.0040111541748047s Without get: 0.0040140151977539s
Output for 5.4.10
With get: 0.0044929981231689s Without get: 0.004796028137207s
Output for 5.4.9
With get: 0.0039870738983154s Without get: 0.0040171146392822s
Output for 5.4.8
With get: 0.006105899810791s Without get: 0.0061459541320801s
Output for 5.4.7
With get: 0.0061600208282471s Without get: 0.0062601566314697s
Output for 5.4.6
With get: 0.0060789585113525s Without get: 0.005993127822876s
Output for 5.4.5
With get: 0.0078620910644531s Without get: 0.0065691471099854s
Output for 5.4.4
With get: 0.0048182010650635s Without get: 0.0047340393066406s
Output for 5.4.3
With get: 0.0045931339263916s Without get: 0.004572868347168s
Output for 5.4.2
With get: 0.0056629180908203s Without get: 0.0057618618011475s
Output for 5.4.1
With get: 0.0056889057159424s Without get: 0.005608081817627s
Output for 5.4.0
With get: 0.0062479972839355s Without get: 0.0065879821777344s
Output for 5.3.29
With get: 0.010550022125244s Without get: 0.0090029239654541s
Output for 5.3.28
With get: 0.010661840438843s Without get: 0.010144948959351s
Output for 5.3.27
With get: 0.0065639019012451s Without get: 0.0067710876464844s
Output for 5.3.26
With get: 0.0067980289459229s Without get: 0.0068790912628174s
Output for 5.3.25
With get: 0.0068998336791992s Without get: 0.0064558982849121s
Output for 5.3.24
With get: 0.006633996963501s Without get: 0.0066440105438232s
Output for 5.3.23
With get: 0.0073690414428711s Without get: 0.0065469741821289s
Output for 5.3.22
With get: 0.0065300464630127s Without get: 0.0064029693603516s
Output for 5.3.21
With get: 0.0066418647766113s Without get: 0.0068180561065674s
Output for 5.3.20
With get: 0.0068058967590332s Without get: 0.0069620609283447s
Output for 5.3.19
With get: 0.0082988739013672s Without get: 0.0077838897705078s
Output for 5.3.18
With get: 0.010248899459839s Without get: 0.010428190231323s
Output for 5.3.17
With get: 0.0068769454956055s Without get: 0.0067710876464844s
Output for 5.3.16
With get: 0.0067679882049561s Without get: 0.006702184677124s
Output for 5.3.15
With get: 0.0097239017486572s Without get: 0.0092370510101318s
Output for 5.3.14
With get: 0.011352062225342s Without get: 0.010514974594116s
Output for 5.3.13
With get: 0.011654853820801s Without get: 0.0088880062103271s
Output for 5.3.12
With get: 0.0073790550231934s Without get: 0.0071580410003662s
Output for 5.3.11
With get: 0.010867834091187s Without get: 0.010259866714478s
Output for 5.3.10
With get: 0.0067911148071289s Without get: 0.0069029331207275s
Output for 5.3.9
With get: 0.0098638534545898s Without get: 0.0093610286712646s
Output for 5.3.8
With get: 0.010706901550293s Without get: 0.010465145111084s
Output for 5.3.7
With get: 0.010962009429932s Without get: 0.010639905929565s
Output for 5.3.6
With get: 0.0073468685150146s Without get: 0.0072200298309326s
Output for 5.3.5
With get: 0.0085420608520508s Without get: 0.0082089900970459s
Output for 5.3.4
With get: 0.011785984039307s Without get: 0.011135101318359s
Output for 5.3.3
With get: 0.009145975112915s Without get: 0.0091361999511719s
Output for 5.3.2
With get: 0.013601064682007s Without get: 0.0094518661499023s
Output for 5.3.1
With get: 0.011375904083252s Without get: 0.010998964309692s
Output for 5.3.0
With get: 0.011535167694092s Without get: 0.010612964630127s
Output for 5.2.17
With get: 0.0087900161743164s Without get: 0.0088160037994385s
Output for 5.2.16
With get: 0.01445484161377s Without get: 0.013717889785767s
Output for 5.2.15
With get: 0.013020038604736s Without get: 0.010327100753784s
Output for 5.2.14
With get: 0.013957023620605s Without get: 0.013759136199951s
Output for 5.2.13
With get: 0.013167142868042s Without get: 0.012546062469482s
Output for 5.2.12
With get: 0.014369964599609s Without get: 0.013443946838379s
Output for 5.2.11
With get: 0.013181209564209s Without get: 0.012140989303589s
Output for 5.2.10
With get: 0.012315034866333s Without get: 0.009099006652832s
Output for 5.2.9
With get: 0.014894962310791s Without get: 0.013862133026123s
Output for 5.2.8
With get: 0.0089268684387207s Without get: 0.0090711116790771s
Output for 5.2.7
With get: 0.015125036239624s Without get: 0.014415979385376s
Output for 5.2.6
With get: 0.012892007827759s Without get: 0.012310028076172s
Output for 5.2.5
With get: 0.011286020278931s Without get: 0.010453939437866s
Output for 5.2.4
With get: 0.017825126647949s Without get: 0.015212059020996s
Output for 5.2.3
With get: 0.012068033218384s Without get: 0.011471033096313s
Output for 5.2.2
With get: 0.010149955749512s Without get: 0.0092301368713379s
Output for 5.2.1
With get: 0.014408111572266s Without get: 0.013439893722534s
Output for 5.2.0
With get: 0.010715007781982s Without get: 0.015400886535645s
Output for 5.1.6
With get: 0.012969017028809s Without get: 0.012495040893555s
Output for 5.1.5
With get: 0.010676860809326s Without get: 0.0097448825836182s
Output for 5.1.4
With get: 0.012459993362427s Without get: 0.011049032211304s
Output for 5.1.3
With get: 0.0094180107116699s Without get: 0.0092391967773438s
Output for 5.1.2
With get: 0.0088191032409668s Without get: 0.0088942050933838s
Output for 5.1.1
With get: 0.015706062316895s Without get: 0.014532089233398s
Output for 5.1.0
With get: 0.0087759494781494s Without get: 0.0093460083007812s
Output for 5.0.5
With get: 0.029723167419434s Without get: 0.026349067687988s
Output for 5.0.4
With get: 0.025212049484253s Without get: 0.022963047027588s
Output for 5.0.3
With get: 0.026135921478271s Without get: 0.023298978805542s
Output for 5.0.2
With get: 0.030390024185181s Without get: 0.026675939559937s
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/nHkhL on line 20 With get: 0.025074005126953sPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/nHkhL on line 28 Without get: 0.022179126739502sPHP_EOL
Output for 5.0.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/nHkhL on line 20 With get: 0.02793288230896sPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/nHkhL on line 28 Without get: 0.025085926055908sPHP_EOL
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/nHkhL on line 5
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/nHkhL on line 5
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/nHkhL on line 5
Process exited with code 255.