run code in 200+ 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.2.0
With get: 0.0019629001617432s Without get: 0.001845121383667s
Output for 7.1.7
With get: 0.0024158954620361s Without get: 0.0021228790283203s
Output for 7.1.6
With get: 0.0045230388641357s Without get: 0.004371166229248s
Output for 7.1.5
With get: 0.0021228790283203s Without get: 0.0021119117736816s
Output for 7.1.0
With get: 0.0016829967498779s Without get: 0.0015289783477783s
Output for 7.0.20
With get: 0.0021240711212158s Without get: 0.0021910667419434s
Output for 7.0.14
With get: 0.0031769275665283s Without get: 0.0028159618377686s
Output for 7.0.6
With get: 0.0027821063995361s Without get: 0.0027270317077637s
Output for 7.0.5
With get: 0.0021119117736816s Without get: 0.0020217895507812s
Output for 7.0.4
With get: 0.0027351379394531s Without get: 0.002593994140625s
Output for 7.0.3
With get: 0.0017280578613281s Without get: 0.0017080307006836s
Output for 7.0.2
With get: 0.0024940967559814s Without get: 0.0023748874664307s
Output for 7.0.1
With get: 0.0017340183258057s Without get: 0.0017020702362061s
Output for 7.0.0
With get: 0.0029330253601074s Without get: 0.002903938293457s
Output for 5.6.28
With get: 0.0083141326904297s Without get: 0.008181095123291s
Output for 5.6.21
With get: 0.0062828063964844s Without get: 0.0060830116271973s
Output for 5.6.20
With get: 0.0063841342926025s Without get: 0.0062479972839355s
Output for 5.6.19
With get: 0.006525993347168s Without get: 0.0062851905822754s
Output for 5.6.18
With get: 0.0053951740264893s Without get: 0.0052289962768555s
Output for 5.6.17
With get: 0.0047619342803955s Without get: 0.0044701099395752s
Output for 5.6.16
With get: 0.0056462287902832s Without get: 0.0055780410766602s
Output for 5.6.15
With get: 0.0064918994903564s Without get: 0.0063869953155518s
Output for 5.6.14
With get: 0.0063560009002686s Without get: 0.0061039924621582s
Output for 5.6.13
With get: 0.0063259601593018s Without get: 0.0060877799987793s
Output for 5.6.12
With get: 0.0055148601531982s Without get: 0.0053911209106445s
Output for 5.6.11
With get: 0.0059161186218262s Without get: 0.0059919357299805s
Output for 5.6.10
With get: 0.0065388679504395s Without get: 0.0066170692443848s
Output for 5.6.9
With get: 0.0059449672698975s Without get: 0.0064089298248291s
Output for 5.6.8
With get: 0.0042459964752197s Without get: 0.004188060760498s
Output for 5.6.7
With get: 0.0068638324737549s Without get: 0.0068569183349609s
Output for 5.6.6
With get: 0.0058131217956543s Without get: 0.0057239532470703s
Output for 5.6.5
With get: 0.0041680335998535s Without get: 0.0042078495025635s
Output for 5.6.4
With get: 0.0063920021057129s Without get: 0.0060808658599854s
Output for 5.6.3
With get: 0.0040500164031982s Without get: 0.0040371417999268s
Output for 5.6.2
With get: 0.0041711330413818s Without get: 0.0043251514434814s
Output for 5.6.1
With get: 0.0058920383453369s Without get: 0.0051300525665283s
Output for 5.6.0
With get: 0.0043349266052246s Without get: 0.0040340423583984s
Output for 5.5.35
With get: 0.0056488513946533s Without get: 0.0055010318756104s
Output for 5.5.34
With get: 0.0061240196228027s Without get: 0.0059218406677246s
Output for 5.5.33
With get: 0.0066308975219727s Without get: 0.0065250396728516s
Output for 5.5.32
With get: 0.0059270858764648s Without get: 0.005742073059082s
Output for 5.5.31
With get: 0.0065751075744629s Without get: 0.0063800811767578s
Output for 5.5.30
With get: 0.0054929256439209s Without get: 0.0053219795227051s
Output for 5.5.29
With get: 0.0070030689239502s Without get: 0.0065789222717285s
Output for 5.5.28
With get: 0.0073370933532715s Without get: 0.0055708885192871s
Output for 5.5.27
With get: 0.0067300796508789s Without get: 0.0062367916107178s
Output for 5.5.26
With get: 0.0067939758300781s Without get: 0.0065600872039795s
Output for 5.5.25
With get: 0.0041251182556152s Without get: 0.0043559074401855s
Output for 5.5.24
With get: 0.0045320987701416s Without get: 0.0050218105316162s
Output for 5.5.23
With get: 0.0055170059204102s Without get: 0.0052390098571777s
Output for 5.5.22
With get: 0.0057001113891602s Without get: 0.0056779384613037s
Output for 5.5.21
With get: 0.0059561729431152s Without get: 0.0059249401092529s
Output for 5.5.20
With get: 0.0048990249633789s Without get: 0.00472092628479s
Output for 5.5.19
With get: 0.0064830780029297s Without get: 0.0063238143920898s
Output for 5.5.18
With get: 0.00506591796875s Without get: 0.0048990249633789s
Output for 5.5.16
With get: 0.0050539970397949s Without get: 0.0048918724060059s
Output for 5.5.15
With get: 0.0062141418457031s Without get: 0.0060291290283203s
Output for 5.5.14
With get: 0.0064899921417236s Without get: 0.0063750743865967s
Output for 5.5.13
With get: 0.0060570240020752s Without get: 0.006134033203125s
Output for 5.5.12
With get: 0.00699782371521s Without get: 0.0066158771514893s
Output for 5.5.11
With get: 0.0052809715270996s Without get: 0.0051310062408447s
Output for 5.5.10
With get: 0.0054910182952881s Without get: 0.0056169033050537s
Output for 5.5.9
With get: 0.0068440437316895s Without get: 0.006533145904541s
Output for 5.5.8
With get: 0.004310131072998s Without get: 0.0041608810424805s
Output for 5.5.7
With get: 0.0067949295043945s Without get: 0.0067129135131836s
Output for 5.5.6
With get: 0.0059010982513428s Without get: 0.0056788921356201s
Output for 5.5.5
With get: 0.0060980319976807s Without get: 0.005885124206543s
Output for 5.5.4
With get: 0.0069210529327393s Without get: 0.006601095199585s
Output for 5.5.3
With get: 0.0054481029510498s Without get: 0.005375862121582s
Output for 5.5.2
With get: 0.0068550109863281s Without get: 0.0065069198608398s
Output for 5.5.1
With get: 0.0067470073699951s Without get: 0.0065040588378906s
Output for 5.5.0
With get: 0.0065200328826904s Without get: 0.0057470798492432s
Output for 5.4.45
With get: 0.007194995880127s Without get: 0.0065460205078125s
Output for 5.4.44
With get: 0.0065600872039795s Without get: 0.0062260627746582s
Output for 5.4.43
With get: 0.0068769454956055s Without get: 0.0066189765930176s
Output for 5.4.42
With get: 0.0066549777984619s Without get: 0.0066530704498291s
Output for 5.4.41
With get: 0.0066587924957275s Without get: 0.0052850246429443s
Output for 5.4.40
With get: 0.0062417984008789s Without get: 0.0059840679168701s
Output for 5.4.39
With get: 0.0066120624542236s Without get: 0.006375789642334s
Output for 5.4.38
With get: 0.0074408054351807s Without get: 0.0069859027862549s
Output for 5.4.37
With get: 0.0056321620941162s Without get: 0.0055580139160156s
Output for 5.4.36
With get: 0.0061039924621582s Without get: 0.005997896194458s
Output for 5.4.35
With get: 0.0044059753417969s Without get: 0.0042879581451416s
Output for 5.4.34
With get: 0.0047049522399902s Without get: 0.0047121047973633s
Output for 5.4.32
With get: 0.0065150260925293s Without get: 0.0062050819396973s
Output for 5.4.31
With get: 0.0057039260864258s Without get: 0.0058550834655762s
Output for 5.4.30
With get: 0.0078341960906982s Without get: 0.0078220367431641s
Output for 5.4.29
With get: 0.0060839653015137s Without get: 0.005903959274292s
Output for 5.4.28
With get: 0.007688045501709s Without get: 0.0077190399169922s
Output for 5.4.27
With get: 0.0055978298187256s Without get: 0.0056610107421875s
Output for 5.4.26
With get: 0.006141185760498s Without get: 0.0059762001037598s
Output for 5.4.25
With get: 0.0075139999389648s Without get: 0.0072760581970215s
Output for 5.4.24
With get: 0.0069999694824219s Without get: 0.0069670677185059s
Output for 5.4.23
With get: 0.0054938793182373s Without get: 0.0056829452514648s
Output for 5.4.22
With get: 0.0044019222259521s Without get: 0.0044639110565186s
Output for 5.4.21
With get: 0.006598949432373s Without get: 0.0068020820617676s
Output for 5.4.20
With get: 0.00661301612854s Without get: 0.0064120292663574s
Output for 5.4.19
With get: 0.0063350200653076s Without get: 0.0062360763549805s
Output for 5.4.18
With get: 0.0062918663024902s Without get: 0.0070900917053223s
Output for 5.4.17
With get: 0.0053718090057373s Without get: 0.0051600933074951s
Output for 5.4.16
With get: 0.0053980350494385s Without get: 0.0055620670318604s
Output for 5.4.15
With get: 0.0067808628082275s Without get: 0.0065720081329346s
Output for 5.4.14
With get: 0.0068490505218506s Without get: 0.0065829753875732s
Output for 5.4.13
With get: 0.0071978569030762s Without get: 0.0069780349731445s
Output for 5.4.12
With get: 0.0068240165710449s Without get: 0.0066049098968506s
Output for 5.4.11
With get: 0.0062308311462402s Without get: 0.0060889720916748s
Output for 5.4.10
With get: 0.0049281120300293s Without get: 0.0046210289001465s
Output for 5.4.9
With get: 0.0067930221557617s Without get: 0.0065929889678955s
Output for 5.4.8
With get: 0.0066709518432617s Without get: 0.0071618556976318s
Output for 5.4.7
With get: 0.0056290626525879s Without get: 0.0055339336395264s
Output for 5.4.6
With get: 0.0046758651733398s Without get: 0.0048811435699463s
Output for 5.4.5
With get: 0.0067319869995117s Without get: 0.0068070888519287s
Output for 5.4.4
With get: 0.0041038990020752s Without get: 0.0040931701660156s
Output for 5.4.3
With get: 0.004626989364624s Without get: 0.0045948028564453s
Output for 5.4.2
With get: 0.0044748783111572s Without get: 0.0043931007385254s
Output for 5.4.1
With get: 0.0042049884796143s Without get: 0.0043320655822754s
Output for 5.4.0
With get: 0.0042960643768311s Without get: 0.004101037979126s
Output for 5.3.29
With get: 0.0070919990539551s Without get: 0.0070722103118896s
Output for 5.3.28
With get: 0.010843992233276s Without get: 0.010376930236816s
Output for 5.3.27
With get: 0.0069968700408936s Without get: 0.0072500705718994s
Output for 5.3.26
With get: 0.010864973068237s Without get: 0.010327100753784s
Output for 5.3.25
With get: 0.010980129241943s Without get: 0.01015305519104s
Output for 5.3.24
With get: 0.008983850479126s Without get: 0.0086920261383057s
Output for 5.3.23
With get: 0.011486053466797s Without get: 0.0099260807037354s
Output for 5.3.22
With get: 0.0096409320831299s Without get: 0.008781909942627s
Output for 5.3.21
With get: 0.010643005371094s Without get: 0.010418891906738s
Output for 5.3.20
With get: 0.01036810874939s Without get: 0.0089290142059326s
Output for 5.3.19
With get: 0.0098779201507568s Without get: 0.0096008777618408s
Output for 5.3.18
With get: 0.01007080078125s Without get: 0.0092611312866211s
Output for 5.3.17
With get: 0.0080969333648682s Without get: 0.0080740451812744s
Output for 5.3.16
With get: 0.010881900787354s Without get: 0.0093140602111816s
Output for 5.3.15
With get: 0.0098640918731689s Without get: 0.0093941688537598s
Output for 5.3.14
With get: 0.010506868362427s Without get: 0.010175943374634s
Output for 5.3.13
With get: 0.0069057941436768s Without get: 0.0067059993743896s
Output for 5.3.12
With get: 0.011291980743408s Without get: 0.010495185852051s
Output for 5.3.11
With get: 0.0087399482727051s Without get: 0.0080819129943848s
Output for 5.3.10
With get: 0.0070140361785889s Without get: 0.0069289207458496s
Output for 5.3.9
With get: 0.011530160903931s Without get: 0.010580062866211s
Output for 5.3.8
With get: 0.0088200569152832s Without get: 0.0084769725799561s
Output for 5.3.7
With get: 0.0095129013061523s Without get: 0.0071969032287598s
Output for 5.3.6
With get: 0.0092289447784424s Without get: 0.010082960128784s
Output for 5.3.5
With get: 0.010877847671509s Without get: 0.0097639560699463s
Output for 5.3.4
With get: 0.0076098442077637s Without get: 0.0074529647827148s
Output for 5.3.3
With get: 0.009829044342041s Without get: 0.0095961093902588s
Output for 5.3.2
With get: 0.0092668533325195s Without get: 0.0089061260223389s
Output for 5.3.1
With get: 0.0089399814605713s Without get: 0.010644912719727s
Output for 5.3.0
With get: 0.0069530010223389s Without get: 0.0071249008178711s
Output for 5.2.17
With get: 0.014478921890259s Without get: 0.013766050338745s
Output for 5.2.16
With get: 0.013797044754028s Without get: 0.014688968658447s
Output for 5.2.15
With get: 0.010390043258667s Without get: 0.010568857192993s
Output for 5.2.14
With get: 0.014065980911255s Without get: 0.013116121292114s
Output for 5.2.13
With get: 0.013774871826172s Without get: 0.013159990310669s
Output for 5.2.12
With get: 0.014391899108887s Without get: 0.012987852096558s
Output for 5.2.11
With get: 0.013447046279907s Without get: 0.011137008666992s
Output for 5.2.10
With get: 0.014496803283691s Without get: 0.013596057891846s
Output for 5.2.9
With get: 0.0088789463043213s Without get: 0.0089190006256104s
Output for 5.2.8
With get: 0.0089929103851318s Without get: 0.0089671611785889s
Output for 5.2.7
With get: 0.010458946228027s Without get: 0.0099780559539795s
Output for 5.2.6
With get: 0.013947010040283s Without get: 0.012768030166626s
Output for 5.2.5
With get: 0.010279893875122s Without get: 0.0099639892578125s
Output for 5.2.4
With get: 0.014086008071899s Without get: 0.013391971588135s
Output for 5.2.3
With get: 0.014612913131714s Without get: 0.014032125473022s
Output for 5.2.2
With get: 0.014566898345947s Without get: 0.013015031814575s
Output for 5.2.1
With get: 0.0085461139678955s Without get: 0.008465051651001s
Output for 5.2.0
With get: 0.015501022338867s Without get: 0.014237880706787s
Output for 5.1.6
With get: 0.011476993560791s Without get: 0.010825157165527s
Output for 5.1.5
With get: 0.008997917175293s Without get: 0.008997917175293s
Output for 5.1.4
With get: 0.01552414894104s Without get: 0.014674186706543s
Output for 5.1.3
With get: 0.014920949935913s Without get: 0.013829946517944s
Output for 5.1.2
With get: 0.015745878219604s Without get: 0.013433933258057s
Output for 5.1.1
With get: 0.010126113891602s Without get: 0.0096919536590576s
Output for 5.1.0
With get: 0.016595840454102s Without get: 0.014660120010376s
Output for 5.0.5
With get: 0.026127099990845s Without get: 0.023830890655518s
Output for 5.0.4
With get: 0.032299995422363s Without get: 0.027375936508179s
Output for 5.0.3
With get: 0.027665138244629s Without get: 0.024737119674683s
Output for 5.0.2
With get: 0.030440092086792s Without get: 0.028884887695312s
Output for 5.0.1
With get: 0.018976211547852sPHP_EOLWithout get: 0.018208026885986sPHP_EOL
Output for 5.0.0
With get: 0.025804042816162sPHP_EOLWithout get: 0.023528099060059sPHP_EOL
Output for 4.4.2 - 4.4.9
<br /> <b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/in/8HoqE</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
<br /> <b>Parse error</b>: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/in/8HoqE</b> on line <b>5</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.3.4
<br /> <b>Parse error</b>: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in <b>/in/8HoqE</b> on line <b>5</b><br />
Process exited with code 255.