run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public $_field = "abcdefghijklmnopqrstuvwxyz"; public function __get($name) { echo 'method called' . PHP_EOL; } } 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.0024330615997314s Without get: 0.0023629665374756s
Output for 7.1.0alpha1
With get: 0.0033581256866455s Without get: 0.0030930042266846s
Output for 7.0.6
With get: 0.0026512145996094s Without get: 0.0027680397033691s
Output for 7.0.5
With get: 0.0027849674224854s Without get: 0.0027210712432861s
Output for 7.0.4
With get: 0.002079963684082s Without get: 0.0021951198577881s
Output for 7.0.3
With get: 0.0017619132995605s Without get: 0.0017449855804443s
Output for 7.0.2
With get: 0.0019509792327881s Without get: 0.0018980503082275s
Output for 7.0.1
With get: 0.0024840831756592s Without get: 0.0024399757385254s
Output for 7.0.0
With get: 0.0028610229492188s Without get: 0.0028178691864014s
Output for hhvm-3.12.0
With get: 0.010006189346313s Without get: 0.0099079608917236s
Output for hhvm-3.10.0
With get: 0.0080909729003906s Without get: 0.0082089900970459s
Output for 5.6.21
With get: 0.0066230297088623s Without get: 0.0062699317932129s
Output for 5.6.20
With get: 0.0062999725341797s Without get: 0.0062940120697021s
Output for 5.6.19
With get: 0.0075058937072754s Without get: 0.0073330402374268s
Output for 5.6.18
With get: 0.0059270858764648s Without get: 0.0058610439300537s
Output for 5.6.17
With get: 0.0042409896850586s Without get: 0.0042951107025146s
Output for 5.6.16
With get: 0.0055651664733887s Without get: 0.0055909156799316s
Output for 5.6.15
With get: 0.0066800117492676s Without get: 0.0064258575439453s
Output for 5.6.14
With get: 0.0064771175384521s Without get: 0.0064461231231689s
Output for 5.6.13
With get: 0.0058650970458984s Without get: 0.0057179927825928s
Output for 5.6.12
With get: 0.0066711902618408s Without get: 0.0057988166809082s
Output for 5.6.11
With get: 0.0040218830108643s Without get: 0.0042080879211426s
Output for 5.6.10
With get: 0.0040559768676758s Without get: 0.0040969848632812s
Output for 5.6.9
With get: 0.006159782409668s Without get: 0.0066239833831787s
Output for 5.6.8
With get: 0.0050590038299561s Without get: 0.0053060054779053s
Output for 5.6.7
With get: 0.0059809684753418s Without get: 0.0056278705596924s
Output for 5.5.35
With get: 0.0061399936676025s Without get: 0.0059120655059814s
Output for 5.5.34
With get: 0.0065319538116455s Without get: 0.0063579082489014s
Output for 5.5.33
With get: 0.0058538913726807s Without get: 0.0057201385498047s
Output for 5.5.32
With get: 0.0058608055114746s Without get: 0.0056078433990479s
Output for 5.5.31
With get: 0.0056860446929932s Without get: 0.0055141448974609s
Output for 5.5.30
With get: 0.0059120655059814s Without get: 0.0060348510742188s
Output for 5.5.29
With get: 0.0041539669036865s Without get: 0.0045077800750732s
Output for 5.5.28
With get: 0.0063579082489014s Without get: 0.0063180923461914s
Output for 5.5.27
With get: 0.0046868324279785s Without get: 0.0041260719299316s
Output for 5.5.26
With get: 0.0065009593963623s Without get: 0.0062410831451416s
Output for 5.5.25
With get: 0.006666898727417s Without get: 0.0066461563110352s
Output for 5.5.24
With get: 0.0066659450531006s Without get: 0.0058319568634033s
Output for 5.4.45
With get: 0.005216121673584s Without get: 0.0054070949554443s
Output for 5.4.44
With get: 0.0066530704498291s Without get: 0.0050570964813232s
Output for 5.4.43
With get: 0.0052311420440674s Without get: 0.00547194480896s
Output for 5.4.42
With get: 0.0052158832550049s Without get: 0.0051398277282715s
Output for 5.4.41
With get: 0.0056791305541992s Without get: 0.005795955657959s
Output for 5.4.40
With get: 0.0056219100952148s Without get: 0.0062000751495361s
Output for 5.4.39
With get: 0.008206844329834s Without get: 0.008634090423584s
Output for 5.4.38
With get: 0.0057179927825928s Without get: 0.0064270496368408s
Output for 5.4.37
With get: 0.0057580471038818s Without get: 0.0058181285858154s
Output for 5.4.36
With get: 0.0070409774780273s Without get: 0.0056800842285156s
Output for 5.4.35
With get: 0.0056979656219482s Without get: 0.0057380199432373s
Output for 5.4.34
With get: 0.0092120170593262s Without get: 0.0091168880462646s
Output for 5.4.32
With get: 0.0043349266052246s Without get: 0.0043060779571533s
Output for 5.4.31
With get: 0.0042338371276855s Without get: 0.0042400360107422s
Output for 5.4.30
With get: 0.0043189525604248s Without get: 0.0044021606445312s
Output for 5.4.29
With get: 0.0042779445648193s Without get: 0.0042641162872314s
Output for 5.4.28
With get: 0.0042991638183594s Without get: 0.0043168067932129s
Output for 5.4.27
With get: 0.0043549537658691s Without get: 0.0044281482696533s
Output for 5.4.26
With get: 0.0044078826904297s Without get: 0.0042898654937744s
Output for 5.4.25
With get: 0.0044398307800293s Without get: 0.0044999122619629s
Output for 5.4.24
With get: 0.0045008659362793s Without get: 0.0044200420379639s
Output for 5.4.23
With get: 0.0045149326324463s Without get: 0.0046780109405518s
Output for 5.4.22
With get: 0.0044918060302734s Without get: 0.0044472217559814s
Output for 5.4.21
With get: 0.0051629543304443s Without get: 0.0045740604400635s
Output for 5.4.20
With get: 0.0069580078125s Without get: 0.0045449733734131s
Output for 5.4.19
With get: 0.004453182220459s Without get: 0.004504919052124s
Output for 5.4.18
With get: 0.0043668746948242s Without get: 0.0044131278991699s
Output for 5.4.17
With get: 0.0055520534515381s Without get: 0.0053999423980713s
Output for 5.4.16
With get: 0.0065290927886963s Without get: 0.0054709911346436s
Output for 5.4.15
With get: 0.0053930282592773s Without get: 0.0057828426361084s
Output for 5.4.14
With get: 0.0053989887237549s Without get: 0.0055298805236816s
Output for 5.4.13
With get: 0.0059220790863037s Without get: 0.0053908824920654s
Output for 5.4.12
With get: 0.0072569847106934s Without get: 0.0072071552276611s
Output for 5.4.11
With get: 0.005281925201416s Without get: 0.0052649974822998s
Output for 5.4.10
With get: 0.0053088665008545s Without get: 0.0053510665893555s
Output for 5.4.9
With get: 0.0052258968353271s Without get: 0.0052821636199951s
Output for 5.4.8
With get: 0.0052969455718994s Without get: 0.0054581165313721s
Output for 5.4.7
With get: 0.0070438385009766s Without get: 0.0052599906921387s
Output for 5.4.6
With get: 0.0066540241241455s Without get: 0.0064709186553955s
Output for 5.4.5
With get: 0.006450891494751s Without get: 0.0066030025482178s
Output for 5.4.4
With get: 0.0053679943084717s Without get: 0.0052039623260498s
Output for 5.4.3
With get: 0.0071389675140381s Without get: 0.0091569423675537s
Output for 5.4.2
With get: 0.0059189796447754s Without get: 0.0052521228790283s
Output for 5.4.1
With get: 0.0081090927124023s Without get: 0.009105920791626s
Output for 5.4.0
With get: 0.0053918361663818s Without get: 0.0053019523620605s
Output for 5.3.29
With get: 0.010010957717896s Without get: 0.0097198486328125s
Output for 5.3.28
With get: 0.0076608657836914s Without get: 0.0077340602874756s
Output for 5.3.27
With get: 0.0095160007476807s Without get: 0.0091559886932373s
Output for 5.3.26
With get: 0.0092129707336426s Without get: 0.0091979503631592s
Output for 5.3.25
With get: 0.0092940330505371s Without get: 0.0093450546264648s
Output for 5.3.24
With get: 0.0093438625335693s Without get: 0.0092880725860596s
Output for 5.3.23
With get: 0.0093228816986084s Without get: 0.0091891288757324s
Output for 5.3.22
With get: 0.0092301368713379s Without get: 0.0088398456573486s
Output for 5.3.21
With get: 0.0092480182647705s Without get: 0.0091860294342041s
Output for 5.3.20
With get: 0.0091948509216309s Without get: 0.0091230869293213s
Output for 5.3.19
With get: 0.0093882083892822s Without get: 0.0094537734985352s
Output for 5.3.18
With get: 0.0092530250549316s Without get: 0.0091760158538818s
Output for 5.3.17
With get: 0.0089619159698486s Without get: 0.0090889930725098s
Output for 5.3.16
With get: 0.0090999603271484s Without get: 0.0092141628265381s
Output for 5.3.15
With get: 0.0088779926300049s Without get: 0.0088090896606445s
Output for 5.3.14
With get: 0.0092108249664307s Without get: 0.0093080997467041s
Output for 5.3.13
With get: 0.009544849395752s Without get: 0.0097939968109131s
Output for 5.3.12
With get: 0.0094919204711914s Without get: 0.0096039772033691s
Output for 5.3.11
With get: 0.0095760822296143s Without get: 0.0093369483947754s
Output for 5.3.10
With get: 0.0094149112701416s Without get: 0.0090320110321045s
Output for 5.3.9
With get: 0.0093178749084473s Without get: 0.0093741416931152s
Output for 5.3.8
With get: 0.011650085449219s Without get: 0.011178970336914s
Output for 5.3.7
With get: 0.0096797943115234s Without get: 0.0094790458679199s
Output for 5.3.6
With get: 0.0096080303192139s Without get: 0.0094730854034424s
Output for 5.3.5
With get: 0.009315013885498s Without get: 0.0095798969268799s
Output for 5.3.4
With get: 0.01086688041687s Without get: 0.010450839996338s
Output for 5.3.3
With get: 0.0093338489532471s Without get: 0.0093228816986084s
Output for 5.3.2
With get: 0.01073694229126s Without get: 0.010957956314087s
Output for 5.3.1
With get: 0.0092267990112305s Without get: 0.0091218948364258s
Output for 5.3.0
With get: 0.011238813400269s Without get: 0.011271953582764s
Output for 5.2.17
With get: 0.014184951782227s Without get: 0.011785984039307s
Output for 5.2.16
With get: 0.072326898574829s Without get: 0.012022018432617s
Output for 5.2.15
With get: 0.012603044509888s Without get: 0.0123610496521s
Output for 5.2.14
With get: 0.0139319896698s Without get: 0.013915061950684s
Output for 5.2.13
With get: 0.01214599609375s Without get: 0.011965990066528s
Output for 5.2.12
With get: 0.011770963668823s Without get: 0.011610984802246s
Output for 5.2.11
With get: 0.011636972427368s Without get: 0.011688947677612s
Output for 5.2.10
With get: 0.015090942382812s Without get: 0.015130996704102s
Output for 5.2.9
With get: 0.011626005172729s Without get: 0.011857032775879s
Output for 5.2.8
With get: 0.012001037597656s Without get: 0.012190818786621s
Output for 5.2.7
With get: 0.011521100997925s Without get: 0.011703968048096s
Output for 5.2.6
With get: 0.011535167694092s Without get: 0.011497020721436s
Output for 5.2.5
With get: 0.011712074279785s Without get: 0.011790990829468s
Output for 5.2.4
With get: 0.011909008026123s Without get: 0.011665821075439s
Output for 5.2.3
With get: 0.011892080307007s Without get: 0.011909961700439s
Output for 5.2.2
With get: 0.01424503326416s Without get: 0.013411998748779s
Output for 5.2.1
With get: 0.011075019836426s Without get: 0.011237859725952s
Output for 5.2.0
With get: 0.0124671459198s Without get: 0.012448072433472s
Output for 5.1.6
With get: 0.012099027633667s Without get: 0.013743877410889s
Output for 5.1.5
With get: 0.014068841934204s Without get: 0.014093160629272s
Output for 5.1.4
With get: 0.012073993682861s Without get: 0.012049198150635s
Output for 5.1.3
With get: 0.011651992797852s Without get: 0.011743068695068s
Output for 5.1.2
With get: 0.011764049530029s Without get: 0.011764049530029s
Output for 5.1.1
With get: 0.011648893356323s Without get: 0.011297941207886s
Output for 5.1.0
With get: 0.0119309425354s Without get: 0.012108087539673s
Output for 5.0.5
With get: 0.0277099609375s Without get: 0.027654886245728s
Output for 5.0.4
With get: 0.027758121490479s Without get: 0.027956008911133s
Output for 5.0.3
With get: 0.028337001800537s Without get: 0.027787923812866s
Output for 5.0.2
With get: 0.025836944580078s Without get: 0.025907039642334s
Output for 5.0.1
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/19kdT on line 23 With get: 0.026103019714355sPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/19kdT on line 31 Without get: 0.02617883682251sPHP_EOL
Output for 5.0.0
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/19kdT on line 23 With get: 0.027324914932251sPHP_EOL Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/19kdT on line 31 Without get: 0.026520967483521sPHP_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/19kdT on line 5
Process exited with code 255.
Output for 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/19kdT 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/19kdT on line 5
Process exited with code 255.
Output for 4.3.0
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/7lSVo on line 5
Process exited with code 255.