3v4l.org

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

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)
8.3.60.0110.00716.37
8.3.50.0160.00421.15
8.3.40.0040.01118.60
8.3.30.0070.00718.71
8.3.20.0000.00720.19
8.3.10.0030.00523.55
8.3.00.0050.00321.70
8.2.180.0100.00725.92
8.2.170.0070.01422.96
8.2.160.0170.00320.10
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00420.90
8.2.120.0040.00426.35
8.2.110.0060.00319.21
8.2.100.0030.00818.04
8.2.90.0040.00419.22
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0030.00518.04
8.2.50.0050.00318.09
8.2.40.0040.00422.32
8.2.30.0000.00719.48
8.2.20.0050.00217.72
8.2.10.0000.00818.08
8.2.00.0040.00418.09
8.1.280.0120.00625.92
8.1.270.0000.00922.14
8.1.260.0040.00428.09
8.1.250.0110.00428.09
8.1.240.0040.00422.07
8.1.230.0070.00317.77
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0060.00317.23
8.1.190.0000.00817.22
8.1.180.0070.00018.10
8.1.170.0060.00318.50
8.1.160.0040.00420.59
8.1.150.0000.00718.82
8.1.140.0080.00019.51
8.1.130.0000.00817.54
8.1.120.0000.00717.37
8.1.110.0000.00717.32
8.1.100.0070.00017.28
8.1.90.0070.00017.39
8.1.80.0060.00317.30
8.1.70.0030.00317.29
8.1.60.0040.00417.62
8.1.50.0030.00517.46
8.1.40.0000.00817.51
8.1.30.0030.00517.65
8.1.20.0000.00717.57
8.1.10.0040.00417.59
8.1.00.0040.00417.55
8.0.300.0070.00018.77
8.0.290.0090.00016.75
8.0.280.0030.00318.45
8.0.270.0080.00017.20
8.0.260.0030.00317.16
8.0.250.0000.00617.01
8.0.240.0070.00016.95
8.0.230.0070.00016.84
8.0.220.0000.00716.89
8.0.210.0030.00316.77
8.0.200.0030.00316.94
8.0.190.0000.00816.93
8.0.180.0070.00016.84
8.0.170.0040.00416.84
8.0.160.0040.00416.93
8.0.150.0000.00816.84
8.0.140.0000.00816.80
8.0.130.0000.00513.32
8.0.120.0040.00416.73
8.0.110.0000.00716.90
8.0.100.0070.00016.82
8.0.90.0000.00816.90
8.0.80.0060.01016.90
8.0.70.0050.00216.93
8.0.60.0000.00816.88
8.0.50.0040.00416.78
8.0.30.0150.00317.12
8.0.20.0120.00917.40
8.0.10.0040.00416.85
8.0.00.0120.00816.82
7.4.330.0020.00216.77
7.4.320.0030.00316.34
7.4.300.0020.00516.49
7.4.290.0030.00316.63
7.4.280.0040.00416.47
7.4.270.0030.00316.50
7.4.260.0000.00716.38
7.4.250.0040.00416.55
7.4.240.0000.00716.41
7.4.230.0000.00716.63
7.4.220.0110.00716.70
7.4.210.0060.00916.49
7.4.200.0040.00416.58
7.4.160.0080.00816.51
7.4.150.0150.00317.40
7.4.140.0050.01317.86
7.4.130.0060.01116.51
7.4.120.0080.00816.51
7.4.110.0030.01716.46
7.4.100.0150.00916.27
7.4.90.0090.00916.45
7.4.80.0110.01119.39
7.4.70.0120.00416.32
7.4.60.0120.01216.44
7.4.50.0130.00316.32
7.4.40.0160.00016.23
7.4.30.0120.00916.40
7.4.00.0130.00314.84
7.3.330.0040.00413.19
7.3.320.0000.00513.32
7.3.310.0000.00616.26
7.3.300.0070.00016.19
7.3.290.0000.00716.37
7.3.280.0070.01116.33
7.3.270.0130.00417.40
7.3.260.0100.00716.71
7.3.250.0060.01016.52
7.3.240.0100.01116.48
7.3.230.0070.01116.54
7.3.210.0160.00616.38
7.3.200.0100.00719.39
7.3.190.0130.01016.38
7.3.180.0130.00416.46
7.3.170.0030.01716.56
7.3.160.0180.00616.51
7.2.330.0000.01816.29
7.2.320.0110.00916.60
7.2.310.0070.01116.68
7.2.300.0110.00616.43
7.2.290.0030.01416.62
7.2.00.0000.01219.40
7.1.100.0000.01218.07
7.1.70.0070.00717.18
7.1.60.0070.00719.40
7.1.50.0090.01216.62
7.1.00.0070.07322.36
7.0.200.0420.01014.88
7.0.100.0200.06019.95
7.0.90.0270.06719.88
7.0.80.0030.04719.93
7.0.70.0030.08319.86
7.0.60.0070.04319.93
7.0.50.0200.06020.36
7.0.40.0070.03320.13
7.0.30.0030.04319.98
7.0.20.0000.08320.02
7.0.10.0000.08320.13
7.0.00.0030.06320.16
5.6.280.0100.02320.79
5.6.250.0030.04720.68
5.6.240.0070.07320.55
5.6.230.0030.05020.76
5.6.220.0070.05720.68
5.6.210.0030.04720.66
5.6.200.0030.04021.01
5.6.190.0070.06721.01
5.6.180.0030.04321.07
5.6.170.0070.04021.13
5.6.160.0030.08721.04
5.6.150.0030.08021.00
5.6.140.0000.05321.08
5.6.130.0130.08021.07
5.6.120.0170.07321.03
5.6.110.0070.05321.00
5.6.100.0030.04021.16
5.6.90.0100.06321.04
5.6.80.0130.07320.45
5.6.70.0100.07020.48
5.6.60.0100.07720.41
5.6.50.0000.07020.55
5.6.40.0170.06320.43
5.6.30.0230.06320.48
5.6.20.0030.06720.46
5.6.10.0070.04020.30
5.6.00.0100.05720.41
5.5.380.0100.04020.36
5.5.370.0030.07020.36
5.5.360.0130.08720.36
5.5.350.0130.04020.35
5.5.340.0070.08020.92
5.5.330.0130.05720.87
5.5.320.0000.08320.90
5.5.310.0070.04320.72
5.5.300.0100.05320.77
5.5.290.0030.08320.80
5.5.280.0100.03720.80
5.5.270.0170.07020.81
5.5.260.0000.05020.81
5.5.250.0130.04020.71
5.5.240.0030.07720.21
5.5.230.0070.07720.10
5.5.220.0070.07320.26
5.5.210.0030.05720.21
5.5.200.0170.07320.11
5.5.190.0200.06019.98
5.5.180.0130.07319.98
5.5.160.0070.08020.14
5.5.150.0030.07720.14
5.5.140.0200.05720.21
5.5.130.0200.06020.20
5.5.120.0070.07020.23
5.5.110.0030.08020.23
5.5.100.0070.07720.16
5.5.90.0030.07719.94
5.5.80.0070.08020.14
5.5.70.0130.06720.00
5.5.60.0070.04320.08
5.5.50.0070.07020.14
5.5.40.0000.04720.08
5.5.30.0130.04020.18
5.5.20.0170.03019.89
5.5.10.0130.07020.00
5.5.00.0030.07319.96

preferences:
43.72 ms | 401 KiB | 5 Q