3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testCase { private $stores; public function doFunction($items = array(), $out ) { foreach($items as $num => $val) { if($num%2 == 0) { $out = $val; } else { $out = strtoupper($val); } $out = "<br />"; } return $this->store = $out; } /* PRIVATE, SO NOT ACCESSIBLE! */ private function unFunction($items = '', $out = array()) { $items = implode("<br >", $items, -1); foreach($items as $num => $val) { if($num%2 != 0) { $out[$num] = $val; } else { $out[$num] = strtlower($val); } } echo $out; } } // $test = new testCase(); //echo $test -> doFunction(array_merge(range(0,25), range('a','z'))) . "<hr />"; //print_r($test -> unFunction($test->store)); echo $test->doFunction(array_merge(range(0,25)); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.270.0270.04019.14
5.4.260.0370.02718.95
5.4.250.0270.04318.86
5.4.240.0230.04319.08
5.4.230.0230.04718.97
5.4.220.0270.06318.97
5.4.210.0200.06718.98
5.4.200.0270.07319.16
5.4.190.0170.06019.07
5.4.180.0030.08019.21
5.4.170.0070.07719.07
5.4.160.0000.07319.17
5.4.150.0130.06718.85
5.4.140.0070.04016.43
5.4.130.0030.04716.50
5.4.120.0170.05016.54
5.4.110.0100.06716.62
5.4.100.0070.05316.45
5.4.90.0000.07016.24
5.4.80.0070.07016.60
5.4.70.0000.05316.58
5.4.60.0070.03316.33
5.4.50.0000.04016.32
5.4.40.0000.05716.27
5.4.30.0000.06316.32
5.4.20.0070.05716.33
5.4.10.0030.08016.23
5.4.00.0100.06715.98
5.3.280.0230.05714.69
5.3.270.0530.07014.58
5.3.260.0030.05714.53
5.3.250.0000.07714.53
5.3.240.0070.05314.61
5.3.230.0070.07714.76
5.3.220.0030.06314.58
5.3.210.0030.06014.65
5.3.200.0070.06314.75
5.3.190.0030.06014.67
5.3.180.0070.07014.79
5.3.170.0030.07314.49
5.3.160.0100.03014.47
5.3.150.0000.04014.57
5.3.140.0030.07314.61
5.3.130.0030.05014.64
5.3.120.0030.08014.60
5.3.110.0000.08314.61
5.3.100.0030.07014.03
5.3.90.0030.07314.02
5.3.80.0100.07013.95
5.3.70.0000.05014.07
5.3.60.0000.07313.91
5.3.50.0030.07014.00
5.3.40.0000.05313.96
5.3.30.0000.04713.84
5.3.20.0070.07013.94
5.3.10.0130.03013.59
5.3.00.0000.06713.57
5.2.170.0000.06313.04
5.2.160.0070.06013.04
5.2.150.0000.04713.04
5.2.140.0070.05713.04
5.2.130.0000.05013.04
5.2.120.0030.05713.04
5.2.110.0000.05713.04
5.2.100.0030.06013.04
5.2.90.0000.05313.04
5.2.80.0030.05013.04
5.2.70.0070.04713.04
5.2.60.0000.06313.04
5.2.50.0070.04313.04
5.2.40.0100.03013.04
5.2.30.0130.03313.04
5.2.20.0070.05713.04
5.2.10.0030.05713.04
5.2.00.0100.06013.04
5.1.60.0000.05313.04
5.1.50.0070.02713.04
5.1.40.0130.04713.04
5.1.30.0000.03713.04
5.1.20.0100.04313.04
5.1.10.0100.04713.04
5.1.00.0030.05313.04
5.0.50.0070.04013.04
5.0.40.0030.04013.04
5.0.30.0000.05013.04
5.0.20.0000.03713.04
5.0.10.0000.03013.04
5.0.00.0070.05013.04
4.4.90.0000.03313.04
4.4.80.0000.03013.04
4.4.70.0000.02013.04
4.4.60.0030.03313.04
4.4.50.0000.03713.04
4.4.40.0000.05013.04
4.4.30.0000.03713.04
4.4.20.0030.03313.04
4.4.10.0000.03313.04
4.4.00.0030.05313.04
4.3.110.0000.03713.04
4.3.100.0070.03013.04
4.3.90.0100.02713.04
4.3.80.0070.05013.04
4.3.70.0000.03013.04
4.3.60.0030.02713.04
4.3.50.0030.02013.04
4.3.40.0000.05013.04
4.3.30.0030.02713.04
4.3.20.0030.03313.04
4.3.10.0030.03013.04
4.3.00.0030.03013.04

preferences:
136.24 ms | 1394 KiB | 7 Q