3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Model { public function get() {} } class Foo { protected $model; public function __construct() { $this->model = new Model; } public function doSomethingGetModelOnce() { $model = $this->getModel(); for ($i = 0; $i < 1000; $i++) { $model->get(); } } public function doSomethingGetModelNTimes() { for ($i = 0; $i < 500; $i++) { $this->getModel()->get(); } } protected function getModel() { return $this->model; } } $foo = new Foo(); $time0 = microtime(true); $foo->doSomethingGetModelOnce(); $time1 = microtime(true); $foo->doSomethingGetModelNTimes(); $time2 = microtime(true); var_dump(1000*($time1-$time0), 1000*($time2-$time1));
Output for 7.1.0
float(0.02598762512207) float(0.02288818359375)
Output for 7.0.14
float(0.049114227294922) float(0.046968460083008)
Output for 7.0.7
float(0.041961669921875) float(0.040054321289062)
Output for 7.0.6
float(0.03814697265625) float(0.033855438232422)
Output for 7.0.5
float(0.076055526733398) float(0.043869018554688)
Output for 7.0.4
float(0.041007995605469) float(0.040054321289062)
Output for 7.0.3
float(0.046968460083008) float(0.044107437133789)
Output for 7.0.2
float(0.046968460083008) float(0.043869018554688)
Output for 7.0.1
float(0.043153762817383) float(0.039815902709961)
Output for 7.0.0
float(0.051975250244141) float(0.043153762817383)
Output for hhvm-3.12.0
float(0.1070499420166) float(0.09608268737793)
Output for hhvm-3.10.0
float(0.14805793762207) float(0.15091896057129)
Output for 5.6.28
float(0.14019012451172) float(0.12087821960449)
Output for 5.6.22
float(0.11801719665527) float(0.088930130004883)
Output for 5.6.21
float(0.10895729064941) float(0.097036361694336)
Output for 5.6.20
float(0.086069107055664) float(0.076770782470703)
Output for 5.6.19
float(0.1070499420166) float(0.11587142944336)
Output for 5.6.18
float(0.11706352233887) float(0.11110305786133)
Output for 5.6.17
float(0.10991096496582) float(0.09608268737793)
Output for 5.6.16
float(0.1070499420166) float(0.10299682617188)
Output for 5.6.15
float(0.10299682617188) float(0.10085105895996)
Output for 5.6.14
float(0.071048736572266) float(0.070810317993164)
Output for 5.6.13
float(0.071048736572266) float(0.09608268737793)
Output for 5.6.12
float(0.098228454589844) float(0.095844268798828)
Output for 5.6.11
float(0.1220703125) float(0.11110305786133)
Output for 5.6.10
float(0.070810317993164) float(0.063180923461914)
Output for 5.6.9
float(0.095844268798828) float(0.087976455688477)
Output for 5.6.8
float(0.11014938354492) float(0.088930130004883)
Output for 5.6.7
float(0.11515617370605) float(0.10395050048828)
Output for 5.6.6
float(0.092029571533203) float(0.082015991210938)
Output for 5.6.5
float(0.13113021850586) float(0.099897384643555)
Output for 5.6.4
float(0.069141387939453) float(0.061988830566406)
Output for 5.6.3
float(0.10800361633301) float(0.10013580322266)
Output for 5.6.2
float(0.12493133544922) float(0.10991096496582)
Output for 5.6.1
float(0.10895729064941) float(0.098943710327148)
Output for 5.6.0
float(0.12803077697754) float(0.11992454528809)
Output for 5.5.36
float(0.084877014160156) float(0.082015991210938)
Output for 5.5.35
float(0.090837478637695) float(0.08702278137207)
Output for 5.4.10, 5.5.34
float(0.10991096496582) float(0.1070499420166)
Output for 5.5.33
float(0.10514259338379) float(0.10085105895996)
Output for 5.5.32
float(0.11014938354492) float(0.10800361633301)
Output for 5.5.31
float(0.10800361633301) float(0.10585784912109)
Output for 5.5.30
float(0.10204315185547) float(0.11706352233887)
Output for 5.5.29
float(0.1218318939209) float(0.10919570922852)
Output for 5.5.28
float(0.10991096496582) float(0.097990036010742)
Output for 5.5.27
float(0.070095062255859) float(0.068902969360352)
Output for 5.5.26
float(0.11110305786133) float(0.10991096496582)
Output for 5.5.25
float(0.068902969360352) float(0.066995620727539)
Output for 5.5.24
float(0.11110305786133) float(0.10800361633301)
Output for 5.5.23
float(0.10919570922852) float(0.10585784912109)
Output for 5.5.22
float(0.097036361694336) float(0.09608268737793)
Output for 5.5.21
float(0.088930130004883) float(0.088214874267578)
Output for 5.5.20
float(0.068187713623047) float(0.065803527832031)
Output for 5.5.19
float(0.10108947753906) float(0.16880035400391)
Output for 5.5.18
float(0.11086463928223) float(0.15497207641602)
Output for 5.5.16
float(0.090122222900391) float(0.087976455688477)
Output for 5.4.39, 5.4.44, 5.5.15
float(0.10085105895996) float(0.09918212890625)
Output for 5.5.14
float(0.067949295043945) float(0.066041946411133)
Output for 5.5.13
float(0.066995620727539) float(0.066995620727539)
Output for 5.4.19, 5.5.12
float(0.090122222900391) float(0.084877014160156)
Output for 5.5.11
float(0.11086463928223) float(0.10895729064941)
Output for 5.5.10
float(0.095844268798828) float(0.094175338745117)
Output for 5.5.9
float(0.067949295043945) float(0.066995620727539)
Output for 5.5.8
float(0.11610984802246) float(0.12302398681641)
Output for 5.5.7
float(0.091075897216797) float(0.08392333984375)
Output for 5.5.6
float(0.1068115234375) float(0.10418891906738)
Output for 5.5.5
float(0.1368522644043) float(0.10895729064941)
Output for 5.5.4
float(0.11301040649414) float(0.10919570922852)
Output for 5.5.3
float(0.10514259338379) float(0.10585784912109)
Output for 5.5.2
float(0.11610984802246) float(0.11706352233887)
Output for 5.5.1
float(0.11301040649414) float(0.11801719665527)
Output for 5.5.0
float(0.11682510375977) float(0.11610984802246)
Output for 5.4.45
float(0.11110305786133) float(0.11110305786133)
Output for 5.4.43
float(0.11014938354492) float(0.10991096496582)
Output for 5.4.42
float(0.075101852416992) float(0.076055526733398)
Output for 5.4.41
float(0.067949295043945) float(0.067949295043945)
Output for 5.4.7, 5.4.40
float(0.11706352233887) float(0.10991096496582)
Output for 5.4.38
float(0.2140998840332) float(0.22482872009277)
Output for 5.4.37
float(0.093221664428711) float(0.091791152954102)
Output for 5.4.36
float(0.064849853515625) float(0.06413459777832)
Output for 5.4.35
float(0.08082389831543) float(0.066041946411133)
Output for 5.4.34
float(0.11301040649414) float(0.10991096496582)
Output for 5.4.32
float(0.093936920166016) float(0.093936920166016)
Output for 5.4.31
float(0.10585784912109) float(0.10800361633301)
Output for 5.4.30
float(0.077962875366211) float(0.075101852416992)
Output for 5.4.29
float(0.065088272094727) float(0.061988830566406)
Output for 5.4.28
float(0.06413459777832) float(0.062942504882812)
Output for 5.4.27
float(0.066995620727539) float(0.075101852416992)
Output for 5.4.26
float(0.11897087097168) float(0.11587142944336)
Output for 5.4.25
float(0.11205673217773) float(0.11897087097168)
Output for 5.4.24
float(0.10514259338379) float(0.10395050048828)
Output for 5.4.23
float(0.10490417480469) float(0.10299682617188)
Output for 5.4.22
float(0.10085105895996) float(0.097990036010742)
Output for 5.4.21
float(0.1060962677002) float(0.10299682617188)
Output for 5.4.20
float(0.11205673217773) float(0.10895729064941)
Output for 5.4.18
float(0.10991096496582) float(0.11014938354492)
Output for 5.4.17
float(0.10585784912109) float(0.10299682617188)
Output for 5.4.16
float(0.092983245849609) float(0.092029571533203)
Output for 5.4.15
float(0.10490417480469) float(0.1070499420166)
Output for 5.4.14
float(0.098943710327148) float(0.09608268737793)
Output for 5.4.13
float(0.11610984802246) float(0.11897087097168)
Output for 5.4.12
float(0.1070499420166) float(0.15401840209961)
Output for 5.4.11
float(0.10514259338379) float(0.10490417480469)
Output for 5.4.9
float(0.10585784912109) float(0.13899803161621)
Output for 5.4.8
float(0.10418891906738) float(0.10585784912109)
Output for 5.4.6
float(0.10299682617188) float(0.10395050048828)
Output for 5.4.5
float(0.11086463928223) float(0.11420249938965)
Output for 5.4.4
float(0.11491775512695) float(0.1380443572998)
Output for 5.4.3
float(0.066995620727539) float(0.066041946411133)
Output for 5.4.2
float(0.09608268737793) float(0.099897384643555)
Output for 5.4.1
float(0.11086463928223) float(0.11205673217773)
Output for 5.4.0
float(0.10395050048828) float(0.11587142944336)
Output for 5.3.29
float(0.14615058898926) float(0.16283988952637)
Output for 5.3.28
float(0.2288818359375) float(0.25606155395508)
Output for 5.3.27
float(0.2288818359375) float(0.26106834411621)
Output for 5.3.26
float(0.23603439331055) float(0.26106834411621)
Output for 5.3.25
float(0.24199485778809) float(0.28204917907715)
Output for 5.3.24
float(0.23508071899414) float(0.2598762512207)
Output for 5.3.23
float(0.24199485778809) float(0.2601146697998)
Output for 5.3.22
float(0.19598007202148) float(0.21791458129883)
Output for 5.3.21
float(0.23293495178223) float(0.26106834411621)
Output for 5.3.20
float(0.25606155395508) float(0.28204917907715)
Output for 5.3.19
float(0.24604797363281) float(0.27108192443848)
Output for 5.3.18
float(0.22506713867188) float(0.24294853210449)
Output for 5.3.17
float(0.22292137145996) float(0.2439022064209)
Output for 5.3.16
float(0.19717216491699) float(0.21696090698242)
Output for 5.3.15
float(0.26106834411621) float(0.28491020202637)
Output for 5.3.14
float(0.28681755065918) float(0.29706954956055)
Output for 5.3.13
float(0.1680850982666) float(0.18906593322754)
Output for 5.3.12
float(0.14805793762207) float(0.17404556274414)
Output for 5.3.11
float(0.26416778564453) float(0.27298927307129)
Output for 5.3.10
float(0.20408630371094) float(0.22697448730469)
Output for 5.3.9
float(0.19717216491699) float(0.20098686218262)
Output for 5.3.8
float(0.19693374633789) float(0.21600723266602)
Output for 5.3.7
float(0.23388862609863) float(0.25796890258789)
Output for 5.3.6
float(0.21910667419434) float(0.24294853210449)
Output for 5.3.5
float(0.24890899658203) float(0.26893615722656)
Output for 5.3.4
float(0.16498565673828) float(0.18191337585449)
Output for 5.3.3
float(0.22292137145996) float(0.23603439331055)
Output for 5.3.2
float(0.26082992553711) float(0.28800964355469)
Output for 5.3.1
float(0.28300285339355) float(0.3049373626709)
Output for 5.3.0
float(0.26297569274902) float(0.28681755065918)
Output for 5.2.17
float(0.24580955505371) float(0.27823448181152)
Output for 5.2.16
float(0.26893615722656) float(0.28610229492188)
Output for 5.2.15
float(0.30016899108887) float(0.35381317138672)
Output for 5.2.14
float(0.33783912658691) float(0.3809928894043)
Output for 5.2.13
float(0.29587745666504) float(0.34618377685547)
Output for 5.2.12
float(0.32186508178711) float(0.36811828613281)
Output for 5.2.11
float(0.3199577331543) float(0.34904479980469)
Output for 5.2.10
float(0.32210350036621) float(0.3669261932373)
Output for 5.2.9
float(0.29993057250977) float(0.34284591674805)
Output for 5.2.8
float(0.29993057250977) float(0.35595893859863)
Output for 5.2.7
float(0.32186508178711) float(0.35309791564941)
Output for 5.2.6
float(0.32687187194824) float(0.34499168395996)
Output for 5.2.5
float(0.2598762512207) float(0.31304359436035)
Output for 5.2.4
float(0.25820732116699) float(0.29492378234863)
Output for 5.2.3
float(0.3199577331543) float(0.36191940307617)
Output for 5.2.2
float(0.29110908508301) float(0.37789344787598)
Output for 5.2.1
float(0.21219253540039) float(0.24986267089844)
Output for 5.2.0
float(0.2899169921875) float(0.33903121948242)
Output for 5.1.6
float(0.33402442932129) float(0.38003921508789)
Output for 5.1.5
float(0.31399726867676) float(0.36406517028809)
Output for 5.1.4
float(0.32687187194824) float(0.36191940307617)
Output for 5.1.3
float(0.30803680419922) float(0.34189224243164)
Output for 5.1.2
float(0.27608871459961) float(0.33807754516602)
Output for 5.1.1
float(0.32186508178711) float(0.38814544677734)
Output for 5.1.0
float(0.25796890258789) float(0.3058910369873)
Output for 5.0.5
float(0.49710273742676) float(0.40292739868164)
Output for 5.0.4
float(0.56004524230957) float(0.46110153198242)
Output for 5.0.3
float(0.47087669372559) float(0.40507316589355)
Output for 5.0.2
float(0.49996376037598) float(0.40698051452637)
Output for 5.0.1
float(0.52714347839355) float(0.41890144348145)
Output for 5.0.0
float(0.46110153198242) float(0.39196014404297)
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/jbcFa 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/jbcFa 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/jbcFa on line 5
Process exited with code 255.