3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($var){ echo "in function: ",__FUNCTION__; echo "testing $var\n"; } class bla { public $foo = "test"; public function bar($str) { echo $this->foo($str),"\n"; // php5 fails w/o method below specified } public function foo($val){ echo "method: ", __METHOD__,": \n"; test($val); } } $objBla = new bla(); $objBla->bar("someval"); if (phpversion() == "7.0.0"){ ($objBla->foo)("nother val"); }

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)
7.3.120.0060.00914.64
7.3.110.0060.01214.36
7.3.100.0030.00614.48
7.3.90.0100.00714.77
7.3.80.0070.00714.24
7.3.70.0030.01014.61
7.3.60.0080.00514.34
7.3.50.0030.01314.48
7.3.40.0100.00614.52
7.3.30.0030.01014.48
7.3.20.0030.01016.54
7.3.10.0100.00816.20
7.3.00.0100.00616.43
7.2.240.0060.00914.71
7.2.230.0080.00614.61
7.2.220.0070.01014.44
7.2.210.0090.00614.77
7.2.200.0060.00914.93
7.2.190.0060.01015.02
7.2.180.0100.00314.68
7.2.170.0000.01414.95
7.2.160.0090.00314.90
7.2.150.0060.01216.62
7.2.140.0100.00716.71
7.2.130.0070.00916.83
7.2.120.0070.00916.73
7.2.110.0110.00816.49
7.2.100.0060.01216.51
7.2.90.0070.01216.64
7.2.80.0100.00716.56
7.2.70.0060.00916.71
7.2.60.0090.01116.54
7.2.50.0150.00616.70
7.2.40.0050.01316.55
7.2.30.0090.00916.67
7.2.20.0100.01016.63
7.2.10.0070.00816.64
7.2.00.0110.00717.40
7.1.330.0070.00715.41
7.1.320.0040.01115.30
7.1.310.0070.01015.52
7.1.300.0070.00315.48
7.1.290.0000.01515.91
7.1.280.0130.00615.54
7.1.270.0060.00615.67
7.1.260.0110.00415.54
7.1.250.0070.00915.43
7.1.100.0000.01317.90
7.1.70.0040.00417.33
7.1.60.0130.01019.40
7.1.50.0090.01216.68
7.1.00.0030.07722.54
7.0.200.0050.00516.73
7.0.60.0330.06321.75
7.0.50.0100.03317.88
7.0.40.0100.08020.14
7.0.30.0170.06020.24
7.0.20.0270.06320.32
7.0.10.0030.04720.33
7.0.00.0130.07720.20
5.6.280.0070.04321.07
5.6.210.0100.08020.73
5.6.200.0130.08018.16
5.6.190.0070.09020.43
5.6.180.0330.08020.41
5.6.170.0200.04020.58
5.6.160.0170.07320.56
5.6.150.0070.04718.13
5.6.140.0070.04718.24
5.6.130.0000.04718.15
5.6.120.0070.04720.96
5.6.110.0130.08020.98
5.6.100.0070.03721.02
5.6.90.0170.07721.14
5.6.80.0170.07320.42
5.5.350.0200.03720.43
5.5.340.0070.08018.09
5.5.330.0000.04320.30
5.5.320.0570.03320.38
5.5.310.0300.07720.34
5.5.300.0030.04018.05
5.5.290.0070.08017.92
5.5.280.0100.03720.81
5.5.270.0100.08320.88
5.5.260.0170.05020.79
5.5.250.0000.04320.71
5.5.240.0170.08320.20

preferences:
35.37 ms | 401 KiB | 5 Q