3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class SomeObj { public function doTest() {} } $someObj = new SomeObj; class SomeClass { public static function doTest() {;} } function something_doTest() {} // bench static method $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) SomeClass::doTest($i); echo "Static Time: " , (microtime(true)-$starttime) , " ms\n"; // bench object method $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) $someObj->doTest($i); echo "Object Time: " , (microtime(true)-$starttime) , " ms\n"; // bench function $starttime = microtime(true); for ($i = 0; $i< 10*1000*1000; $i++) something_doTest($i); echo "Function Time: " , (microtime(true)-$starttime) , " ms\n";
Output for 7.1.0
Static Time: 0.30761790275574 ms Object Time: 0.27952814102173 ms Function Time: 0.12946605682373 ms
Output for 7.0.14
Static Time: 0.32327604293823 ms Object Time: -0.18855905532837 ms Function Time: -0.22388315200806 ms
Output for 7.0.6
Static Time: 0.28897905349731 ms Object Time: 0.30607104301453 ms Function Time: 0.23668003082275 ms
Output for 7.0.5
Static Time: 0.31111216545105 ms Object Time: 0.3135130405426 ms Function Time: 0.24157905578613 ms
Output for 7.0.4
Static Time: 0.32585096359253 ms Object Time: 0.33228993415833 ms Function Time: 0.24529504776001 ms
Output for 7.0.3
Static Time: 0.3021399974823 ms Object Time: 0.32388091087341 ms Function Time: 0.23988890647888 ms
Output for 7.0.2
Static Time: 0.30119705200195 ms Object Time: 0.32229900360107 ms Function Time: 0.23812985420227 ms
Output for 7.0.1
Static Time: 0.29532098770142 ms Object Time: 0.32109308242798 ms Function Time: 0.23645710945129 ms
Output for 7.0.0
Static Time: 0.30480098724365 ms Object Time: 0.31444692611694 ms Function Time: 0.24017596244812 ms
Output for hhvm-3.12.0
Static Time: 1.2074358463287 ms
Process exited with code 137.
Output for hhvm-3.10.0
Static Time: 1.522989988327 ms
Process exited with code 137.
Output for 5.6.28
Static Time: -0.69240188598633 ms Object Time: 1.1907069683075 ms Function Time: 1.275820016861 ms
Output for 5.6.21
Static Time: 0.72771000862122 ms Object Time: 0.81730484962463 ms Function Time: 0.66882491111755 ms
Output for 5.6.20
Static Time: 0.72667789459229 ms Object Time: 0.79436588287354 ms Function Time: 0.67171692848206 ms
Output for 5.6.19
Static Time: 0.73752903938293 ms Object Time: 0.79354691505432 ms Function Time: 0.66582608222961 ms
Output for 5.6.18
Static Time: 0.73451495170593 ms Object Time: 0.80938601493835 ms Function Time: 0.67979001998901 ms
Output for 5.6.17
Static Time: 0.71402287483215 ms Object Time: 0.79894709587097 ms Function Time: 0.67302823066711 ms
Output for 5.6.16
Static Time: 0.75779008865356 ms Object Time: 0.82555913925171 ms Function Time: 0.7098970413208 ms
Output for 5.6.15
Static Time: 0.74798083305359 ms Object Time: 0.83289003372192 ms Function Time: 0.68448781967163 ms
Output for 5.6.14
Static Time: 0.74599695205688 ms Object Time: 0.82634496688843 ms Function Time: 0.67762589454651 ms
Output for 5.6.13
Static Time: 0.73212385177612 ms Object Time: 0.79441499710083 ms Function Time: 0.66334295272827 ms
Output for 5.6.12
Static Time: 0.80640411376953 ms Object Time: 0.80222296714783 ms Function Time: 0.66771602630615 ms
Output for 5.6.11
Static Time: 0.72839784622192 ms Object Time: 0.79934811592102 ms Function Time: 0.67285704612732 ms
Output for 5.6.10
Static Time: 0.71633100509644 ms Object Time: 0.81299090385437 ms Function Time: 0.67697310447693 ms
Output for 5.6.9
Static Time: 0.73337602615356 ms Object Time: 0.80074191093445 ms Function Time: 0.66798496246338 ms
Output for 5.6.8
Static Time: 0.75860786437988 ms Object Time: 0.83555603027344 ms Function Time: 0.68376302719116 ms
Output for 5.5.35
Static Time: 0.7677481174469 ms Object Time: 0.68048095703125 ms Function Time: 0.56644296646118 ms
Output for 5.5.34
Static Time: 0.70121884346008 ms Object Time: 0.81127405166626 ms Function Time: 0.66576910018921 ms
Output for 5.5.33
Static Time: 0.71753191947937 ms Object Time: 0.791424036026 ms Function Time: 0.6890869140625 ms
Output for 5.5.32
Static Time: 0.72274804115295 ms Object Time: 0.82768511772156 ms Function Time: 0.69475722312927 ms
Output for 5.5.31
Static Time: 1.3225660324097 ms
Process exited with code 137.
Output for 5.5.30
Static Time: 0.71496796607971 ms Object Time: 0.78165698051453 ms Function Time: 0.67916488647461 ms
Output for 5.5.29
Static Time: 0.75388383865356 ms Object Time: 0.79016518592834 ms Function Time: 0.68951010704041 ms
Output for 5.5.28
Static Time: 0.7406849861145 ms Object Time: 0.78786206245422 ms Function Time: 0.65755677223206 ms
Output for 5.5.27
Static Time: 0.75701093673706 ms Object Time: 0.79845714569092 ms Function Time: 0.6638491153717 ms
Output for 5.5.26
Static Time: 0.69873309135437 ms Object Time: 0.79613280296326 ms Function Time: 0.65159893035889 ms
Output for 5.5.25
Static Time: 0.7225239276886 ms Object Time: 0.79093909263611 ms Function Time: 0.65938401222229 ms
Output for 5.5.24
Static Time: 0.75944590568542 ms Object Time: 0.68201899528503 ms Function Time: 0.56130504608154 ms
Output for 5.4.45
Static Time: 0.74172186851501 ms Object Time: 0.82037281990051 ms Function Time: 0.63567304611206 ms
Output for 5.4.44
Static Time: 0.69375991821289 ms Object Time: 0.78487706184387 ms Function Time: 0.92206001281738 ms
Output for 5.4.43
Static Time: 1.2563052177429 ms
Process exited with code 137.
Output for 5.4.42
Static Time: 1.4697740077972 ms
Process exited with code 137.
Output for 5.4.41
Static Time: 1.1323261260986 ms
Process exited with code 137.
Output for 5.4.40
Static Time: 0.74647617340088 ms Object Time: 0.96980404853821 ms
Process exited with code 137.
Output for 5.4.39
Static Time: 1.3210680484772 ms
Process exited with code 137.
Output for 5.4.38
Static Time: 1.6468110084534 ms
Process exited with code 137.
Output for 5.4.37
Static Time: 1.0476319789886 ms Object Time: 1.1995239257812 ms
Process exited with code 137.
Output for 5.4.36
Static Time: 1.1453189849854 ms
Process exited with code 137.
Output for 5.4.35
Static Time: 1.0151510238647 ms Object Time: 1.168023109436 ms
Process exited with code 137.
Output for 5.4.34
Static Time: 1.1659481525421 ms Object Time: 1.1588759422302 ms
Process exited with code 137.
Output for 5.4.32
Static Time: 1.1890230178833 ms
Process exited with code 137.
Output for 5.4.31
Static Time: 0.90970706939697 ms
Process exited with code 137.
Output for 5.4.30
Static Time: 0.73188495635986 ms Object Time: 0.83266711235046 ms
Process exited with code 137.
Output for 5.4.29
Static Time: 1.2144298553467 ms
Process exited with code 137.
Output for 5.4.28
Static Time: 0.92891907691956 ms
Process exited with code 137.
Output for 5.4.27
Static Time: 0.78909087181091 ms Object Time: 0.90655183792114 ms
Process exited with code 137.
Output for 5.4.26
Static Time: 1.0489420890808 ms Object Time: 1.1181969642639 ms
Process exited with code 137.
Output for 5.4.25
Static Time: 1.2146091461182 ms
Process exited with code 137.
Output for 5.4.24
Static Time: 1.2802658081055 ms
Process exited with code 137.
Output for 5.4.23
Static Time: 1.1507902145386 ms
Process exited with code 137.
Output for 5.4.22
Static Time: 0.85794115066528 ms Object Time: 0.9112811088562 ms
Process exited with code 137.
Output for 5.4.21
Static Time: 1.2226650714874 ms
Process exited with code 137.
Output for 5.4.20
Static Time: 1.0575308799744 ms Object Time: 1.0886709690094 ms
Process exited with code 137.
Output for 5.4.19
Static Time: 1.1720509529114 ms Object Time: 1.0179569721222 ms
Process exited with code 137.
Output for 5.4.18
Static Time: 1.3686311244965 ms
Process exited with code 137.
Output for 5.4.17
Static Time: 1.2969009876251 ms
Process exited with code 137.
Output for 5.4.16
Static Time: 1.4742200374603 ms
Process exited with code 137.
Output for 5.4.15
Static Time: 1.1474039554596 ms Object Time: 1.2505989074707 ms
Process exited with code 137.
Output for 5.4.14
Static Time: 1.1695871353149 ms
Process exited with code 137.
Output for 5.4.13
Static Time: 0.83210921287537 ms Object Time: 0.9086320400238 ms
Process exited with code 137.
Output for 5.4.12
Static Time: 0.77654385566711 ms Object Time: 0.88814783096313 ms
Process exited with code 137.
Output for 5.4.11
Static Time: 0.83781504631042 ms Object Time: 0.89683604240417 ms
Process exited with code 137.
Output for 5.4.10
Static Time: 0.76953792572021 ms Object Time: 0.95547199249268 ms
Process exited with code 137.
Output for 5.4.9
Static Time: 1.2815039157867 ms
Process exited with code 137.
Output for 5.4.8
Static Time: 1.2077629566193 ms Object Time: 1.2197749614716 ms
Process exited with code 137.
Output for 5.4.7
Static Time: 0.93045401573181 ms Object Time: 1.1343619823456 ms
Process exited with code 137.
Output for 5.4.6
Static Time: 1.0757369995117 ms
Process exited with code 137.
Output for 5.4.5
Static Time: 0.82432818412781 ms Object Time: 1.2321219444275 ms
Process exited with code 137.
Output for 5.4.4
Static Time: 0.88483595848083 ms Object Time: 1.0084569454193 ms
Process exited with code 137.
Output for 5.4.3
Static Time: 1.0202240943909 ms Object Time: 1.0912878513336 ms
Process exited with code 137.
Output for 5.4.2
Static Time: 0.81444597244263 ms Object Time: 1.0061008930206 ms
Process exited with code 137.
Output for 5.4.1
Static Time: 1.4247951507568 ms
Process exited with code 137.
Output for 5.4.0
Static Time: 1.3745839595795 ms
Process exited with code 137.
Output for 5.0.0 - 5.1.2, 5.1.4 - 5.2.0, 5.2.4 - 5.2.6, 5.2.9 - 5.3.0, 5.3.3, 5.3.5 - 5.3.7, 5.3.9, 5.3.11 - 5.3.13, 5.3.17, 5.3.19, 5.3.25 - 5.3.26, 5.3.29

Process exited with code 137.
Output for 5.3.28
Static Time: 2.0971210002899 ms
Process exited with code 137.
Output for 5.3.27
Static Time: 2.0973279476166 ms
Process exited with code 137.
Output for 5.3.24
Static Time: 2.0316679477692 ms
Process exited with code 137.
Output for 5.3.23
Static Time: 1.8462059497833 ms
Process exited with code 137.
Output for 5.3.22
Static Time: 1.8595638275146 ms
Process exited with code 137.
Output for 5.3.21
Static Time: 2.0277769565582 ms
Process exited with code 137.
Output for 5.3.20
Static Time: 1.7315039634705 ms
Process exited with code 137.
Output for 5.3.18
Static Time: 1.7193701267242 ms
Process exited with code 137.
Output for 5.3.16
Static Time: 1.9173338413239 ms
Process exited with code 137.
Output for 5.3.15
Static Time: 1.955157995224 ms
Process exited with code 137.
Output for 5.3.14
Static Time: 1.7723779678345 ms
Process exited with code 137.
Output for 5.3.10
Static Time: 1.7837269306183 ms
Process exited with code 137.
Output for 5.3.8
Static Time: 1.7284679412842 ms
Process exited with code 137.
Output for 5.3.4
Static Time: 2.0970139503479 ms
Process exited with code 137.
Output for 5.3.2
Static Time: 2.0110328197479 ms
Process exited with code 137.
Output for 5.3.1
Static Time: 1.8381550312042 ms
Process exited with code 137.
Output for 5.2.8
Static Time: 2.0079090595245 ms
Process exited with code 137.
Output for 5.2.7
Static Time: 2.0820779800415 ms
Process exited with code 137.
Output for 5.2.3
Static Time: 1.9979519844055 ms
Process exited with code 137.
Output for 5.2.2
Static Time: 2.2115128040314 ms
Process exited with code 137.
Output for 5.2.1
Static Time: 1.8778820037842 ms
Process exited with code 137.
Output for 5.1.3
Static Time: 1.9085590839386 ms
Process exited with code 137.
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/6aiug 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/6aiug 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/6aiug on line 5
Process exited with code 255.