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"); ($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)
8.3.60.0140.00718.05
8.3.50.0130.00622.04
8.3.40.0040.01118.71
8.3.30.0080.00618.67
8.3.20.0000.00820.16
8.3.10.0040.00423.64
8.3.00.0050.00323.65
8.2.180.0030.01416.35
8.2.170.0070.00722.96
8.2.160.0070.00722.26
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0050.00320.80
8.2.120.0060.00326.35
8.2.110.0090.00019.25
8.2.100.0090.00318.05
8.2.90.0000.00819.21
8.2.80.0090.00017.97
8.2.70.0040.00417.38
8.2.60.0000.00717.93
8.2.50.0040.00418.09
8.2.40.0030.00522.18
8.2.30.0040.00419.34
8.2.20.0050.00217.79
8.2.10.0000.00718.12
8.2.00.0040.00418.04
8.1.280.0040.01125.92
8.1.270.0080.00022.19
8.1.260.0060.00328.09
8.1.250.0060.00328.09
8.1.240.0000.00922.45
8.1.230.0040.00717.70
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.35
8.1.190.0030.00717.23
8.1.180.0040.00418.10
8.1.170.0000.00818.61
8.1.160.0050.00320.58
8.1.150.0000.00818.70
8.1.140.0050.00319.54
8.1.130.0030.00317.56
8.1.120.0030.00317.48
8.1.110.0040.00417.43
8.1.100.0050.00317.32
8.1.90.0070.00017.39
8.1.80.0030.00417.35
8.1.70.0000.00717.39
8.1.60.0000.00817.61
8.1.50.0030.00617.43
8.1.40.0040.00817.52
8.1.30.0030.00517.62
8.1.20.0040.00417.53
8.1.10.0070.00017.55
8.1.00.0000.00817.58
8.0.300.0000.00818.77
8.0.290.0000.00716.63
8.0.280.0070.00018.52
8.0.270.0000.00817.26
8.0.260.0030.00317.13
8.0.250.0000.00816.95
8.0.240.0030.00316.93
8.0.230.0080.00016.87
8.0.220.0040.00416.76
8.0.210.0070.00016.86
8.0.200.0030.00316.87
8.0.190.0000.00716.92
8.0.180.0000.00816.83
8.0.170.0000.00716.90
8.0.160.0040.00416.80
8.0.150.0030.00316.79
8.0.140.0000.00716.74
8.0.130.0030.00313.31
8.0.120.0050.00316.84
8.0.110.0040.00416.92
8.0.100.0050.00216.95
8.0.90.0040.00416.83
8.0.80.0060.00916.94
8.0.70.0040.00416.72
8.0.60.0040.00416.93
8.0.50.0040.00416.93
8.0.30.0080.01016.83
8.0.20.0060.01217.40
8.0.10.0000.00716.85
8.0.00.0070.01016.73
7.4.330.0030.00316.89
7.4.320.0030.00316.52
7.4.300.0000.00716.49
7.4.290.0030.00316.52
7.4.280.0000.00816.56
7.4.270.0070.00016.56
7.4.260.0030.00616.59
7.4.250.0000.00716.57
7.4.240.0040.00416.61
7.4.230.0040.00416.68
7.4.220.0000.02416.59
7.4.210.0000.01416.67
7.4.200.0000.00716.70
7.4.160.0120.00316.49
7.4.150.0090.00917.40
7.4.140.0100.01017.86
7.4.130.0100.01016.60
7.4.120.0120.00516.43
7.4.110.0300.02016.54
7.4.100.0070.01016.50
7.4.90.0100.00716.39
7.4.80.0120.01219.39
7.4.70.0070.01016.73
7.4.60.0060.01116.49
7.4.50.0060.01016.26
7.4.40.0100.00716.32
7.4.30.0100.00916.48
7.4.00.0040.01115.05
7.3.330.0040.00313.18
7.3.320.0030.00313.31
7.3.310.0080.00016.40
7.3.300.0030.00316.37
7.3.290.0090.00716.38
7.3.280.0100.00916.36
7.3.270.0120.00617.40
7.3.260.0080.00916.36
7.3.250.0100.00716.36
7.3.240.0100.00716.63
7.3.230.0070.01016.61
7.3.210.0170.00716.43
7.3.200.0060.00916.50
7.3.190.0100.00716.57
7.3.180.0090.00916.36
7.3.170.0090.00616.71
7.3.160.0030.01216.31
7.2.330.0140.00316.35
7.2.320.0030.01516.90
7.2.310.0060.01116.79
7.2.300.0060.01016.87
7.2.290.0070.01016.34
7.2.110.0340.00416.25
7.2.60.0000.01216.30
7.2.00.0060.00619.21
7.1.200.0060.00315.57
7.1.100.0040.01118.12
7.1.70.0040.00417.23
7.1.60.0110.00719.40
7.1.50.0030.01616.68
7.1.00.0100.07022.44
7.0.200.0030.00616.62
7.0.60.0130.08721.77
7.0.50.0030.04017.87
7.0.40.0100.08320.25
7.0.30.0300.04020.07
7.0.20.0300.06020.23
7.0.10.0030.04720.09
7.0.00.0170.07320.06
5.6.280.0000.03720.90
5.6.210.0130.07320.52
5.6.200.0100.07018.25
5.6.190.0070.05320.63
5.6.180.0330.08020.47
5.6.170.0130.04720.53
5.6.160.0130.08020.71
5.6.150.0030.06718.12
5.6.140.0100.06018.21
5.6.130.0030.08318.18
5.6.120.0130.05721.03
5.6.110.0170.06721.00
5.6.100.0030.04721.12
5.6.90.0030.09021.05
5.6.80.0030.08020.38
5.5.350.0230.07320.42
5.5.340.0100.07317.94
5.5.330.0000.04320.31
5.5.320.0670.05720.20
5.5.310.0300.04720.34
5.5.300.0030.08718.05
5.5.290.0030.07017.98
5.5.280.0030.04020.90
5.5.270.0130.05720.87
5.5.260.0070.04320.77
5.5.250.0000.04320.69
5.5.240.0270.06720.13

preferences:
33.56 ms | 401 KiB | 5 Q