3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{function __construct(){$a=array('I','n','i','t','i','a','t','i','n','g',' ','o','n','e',' ','l','i','n','e',' ','c','l','a','s','s','.','.','.','<','b','r',' ','/','>');foreach($a as $b){echo$b;}}function __destruct(){$a=array('<','b','r',' ','/','>','D','e','s','t','r','o','y','i','n','g',' ','t','h','e',' ','c','l','a','s','s','.','.','.');foreach($a as $b){echo$b;}}function testing(){$a=array('T','h','i','s',' ','i','s',' ','a','n',' ','f','u','n','c','t','i','o','n',' ','i','n',' ','t','h','e',' ','o','n','e',' ','l','i','n','e',' ','c','l','a','s','s','.','5','+','5','=','0');$c=0;$d=0;foreach($a as $b){if(is_numeric($b)){if($c==0){$c=$b;echo$b;}elseif($d==0){$d=$b;echo$b;}else{echo($c+$d);}}else{echo$b;}}}}$test=new Test();$test->testing();unset($test);

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.00416.50
8.3.50.0090.00821.92
8.3.40.0140.00018.70
8.3.30.0110.00319.13
8.3.20.0050.00220.39
8.3.10.0080.00023.66
8.3.00.0060.00319.27
8.2.180.0100.01016.63
8.2.170.0030.01722.96
8.2.160.0080.00620.52
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0050.00226.16
8.2.120.0000.00818.91
8.2.110.0070.00422.11
8.2.100.0040.00817.78
8.2.90.0030.00519.07
8.2.80.0030.00517.97
8.2.70.0080.00417.63
8.2.60.0080.00017.93
8.2.50.0030.00518.07
8.2.40.0030.00619.82
8.2.30.0040.00418.30
8.2.20.0000.00817.82
8.2.10.0040.00418.17
8.2.00.0070.00017.70
8.1.280.0090.00925.92
8.1.270.0030.00623.96
8.1.260.0020.00526.35
8.1.250.0050.00328.09
8.1.240.0040.00423.82
8.1.230.0040.00719.09
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0000.00917.38
8.1.180.0060.00318.10
8.1.170.0080.00018.42
8.1.160.0040.00422.02
8.1.150.0050.00218.66
8.1.140.0040.00417.34
8.1.130.0000.00717.79
8.1.120.0000.00717.48
8.1.110.0000.00817.35
8.1.100.0040.00417.50
8.1.90.0040.00417.45
8.1.80.0000.00817.35
8.1.70.0040.00417.34
8.1.60.0040.00417.64
8.1.50.0060.00317.39
8.1.40.0030.00617.47
8.1.30.0060.00317.59
8.1.20.0030.00617.63
8.1.10.0050.00317.59
8.1.00.0030.00517.50
8.0.300.0070.00019.15
8.0.290.0040.00417.15
8.0.280.0000.00718.45
8.0.270.0000.00717.34
8.0.260.0080.00017.16
8.0.250.0040.00317.04
8.0.240.0030.00316.93
8.0.230.0040.00416.87
8.0.220.0080.00016.93
8.0.210.0030.00316.89
8.0.200.0030.00316.98
8.0.190.0040.00416.93
8.0.180.0090.00016.96
8.0.170.0000.00917.03
8.0.160.0050.00217.06
8.0.150.0080.00016.88
8.0.140.0000.00817.01
8.0.130.0030.00313.46
8.0.120.0040.00416.88
8.0.110.0000.00716.95
8.0.100.0050.00216.99
8.0.90.0050.00317.00
8.0.80.0030.01217.02
8.0.70.0040.00416.79
8.0.60.0040.00416.93
8.0.50.0040.00416.81
8.0.30.0150.00517.36
8.0.20.0120.00717.40
8.0.10.0030.00516.88
8.0.00.0110.00916.90
7.4.330.0000.00615.00
7.4.320.0060.00016.51
7.4.300.0000.00616.54
7.4.290.0000.00816.43
7.4.280.0080.00016.52
7.4.270.0000.00716.49
7.4.260.0000.00716.44
7.4.250.0000.00816.43
7.4.240.0000.00716.62
7.4.230.0030.00316.51
7.4.220.0070.01316.68
7.4.210.0090.00616.56
7.4.200.0000.00716.26
7.4.190.0030.00316.69
7.4.160.0140.00316.55
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0080.00816.54
7.4.120.0140.00416.56
7.4.110.0070.01116.63
7.4.100.0150.00516.33
7.4.90.0070.01016.50
7.4.80.0090.00819.39
7.4.70.0130.00616.30
7.4.60.0090.00916.52
7.4.50.0030.00616.24
7.4.40.0090.00616.41
7.4.30.0090.00916.49
7.4.00.0060.00914.93
7.3.330.0070.00013.20
7.3.320.0020.00213.45
7.3.310.0050.00216.36
7.3.300.0070.00016.28
7.3.290.0140.00616.31
7.3.280.0100.00916.38
7.3.270.0070.01117.40
7.3.260.0080.01116.35
7.3.250.0100.00916.43
7.3.240.0130.01016.61
7.3.230.0100.00716.49
7.3.210.0110.00716.34
7.3.200.0070.01119.39
7.3.190.0100.01016.65
7.3.180.0040.01316.52
7.3.170.0060.01016.46
7.3.160.0110.00616.64
7.3.120.0040.01114.86
7.2.330.0140.00416.60
7.2.320.0130.00616.80
7.2.310.0140.00716.75
7.2.300.0030.01416.76
7.2.290.0030.01416.52
7.2.00.0040.01119.41
7.1.100.0060.00917.81
7.1.70.0030.00616.91
7.1.60.0070.01019.46
7.1.50.0100.01316.64
7.1.00.0070.07322.25
7.0.200.0040.00416.47
7.0.140.0070.07021.99
7.0.60.0030.07319.80
7.0.50.0070.07317.88
7.0.40.0070.04020.13
7.0.30.0200.05020.20
7.0.20.0370.07320.03
7.0.10.0230.03720.06
7.0.00.0100.08020.15
5.6.280.0030.07021.04
5.6.210.0000.06020.62
5.6.200.0030.04018.20
5.6.190.0130.07720.55
5.6.180.3700.05020.65
5.6.170.0230.08020.54
5.6.160.0030.09020.61
5.6.150.0130.07018.18
5.6.140.0070.04718.21
5.6.130.0100.07718.21
5.6.120.0030.09021.02
5.6.110.0070.08321.10
5.6.100.0070.04021.14
5.6.90.0070.08320.99
5.6.80.0070.06720.42
5.6.70.0100.03720.53
5.5.350.0130.08720.32
5.5.340.0130.07317.96
5.5.330.0100.06720.23
5.5.320.0070.04720.48
5.5.310.0170.04320.30
5.5.300.0100.08017.99
5.5.290.0030.04318.04
5.5.280.0200.06321.00
5.5.270.0130.08020.89
5.5.260.0100.05320.98
5.5.250.0100.08720.81
5.5.240.0070.06320.28
5.4.450.0700.05719.64
5.4.440.0870.05319.70
5.4.430.0730.06019.47
5.4.420.0600.00019.39
5.4.410.0200.04718.81
5.4.400.0230.05718.79
5.4.390.0230.05718.61
5.4.380.0230.05018.76
5.4.370.0100.04718.59
5.4.360.0130.03718.63
5.4.350.0060.03612.04
5.4.340.0070.03412.03
5.4.320.0060.03912.52
5.4.310.0050.04312.52
5.4.300.0070.04012.52
5.4.290.0120.05012.52
5.4.280.0110.04912.41
5.4.270.0100.04712.41
5.4.260.0110.05312.41
5.4.250.0090.05912.42
5.4.240.0090.03712.41
5.4.230.0060.03912.41
5.4.220.0100.03412.41
5.4.210.0050.03712.40
5.4.200.0130.04312.41
5.4.190.0070.03712.40
5.4.180.0040.04412.40
5.4.170.0100.03512.41
5.4.160.0080.03812.41
5.4.150.0090.03612.40
5.4.140.0060.04212.09
5.4.130.0100.04012.08
5.4.120.0080.04412.04
5.4.110.0190.07912.04
5.4.100.0100.04612.03
5.4.90.0110.03512.04
5.4.80.0080.05312.03
5.4.70.0070.05212.03
5.4.60.0070.03912.03
5.4.50.0090.03812.03
5.4.40.0070.04012.02
5.4.30.0070.04012.01
5.4.20.0090.03712.02
5.4.10.0100.03412.01
5.4.00.0040.04011.50
5.3.290.0100.03912.80
5.3.280.0080.04712.71
5.3.270.0100.05812.72
5.3.260.0090.04812.72
5.3.250.0090.04612.72
5.3.240.0110.04512.71
5.3.230.0090.03712.71
5.3.220.0130.05212.68
5.3.210.0080.05712.68
5.3.200.0110.05012.68
5.3.190.0060.05412.68
5.3.180.0120.04612.67
5.3.170.0080.05012.67
5.3.160.0150.10412.67
5.3.150.0120.05012.67
5.3.140.0120.05012.66
5.3.130.0120.05212.66
5.3.120.0070.04212.66
5.3.110.0060.04112.66
5.3.100.0100.04212.14
5.3.90.0060.05912.13
5.3.80.0090.05212.12
5.3.70.0080.05112.12
5.3.60.0100.04912.10
5.3.50.0080.04912.05
5.3.40.0090.04912.05
5.3.30.0100.04912.01
5.3.20.0060.04111.79
5.3.10.0060.05111.76
5.3.00.0030.05511.75
5.2.170.0060.0319.25
5.2.160.0070.0339.25
5.2.150.0050.0309.25
5.2.140.0100.0359.25
5.2.130.0040.0299.20
5.2.120.0040.0319.21
5.2.110.0050.0389.21
5.2.100.0070.0289.20
5.2.90.0060.0309.21
5.2.80.0080.0319.20
5.2.70.0070.0339.20
5.2.60.0120.0449.16
5.2.50.0090.0329.12
5.2.40.0040.0369.10
5.2.30.0070.0329.07
5.2.20.0040.0309.07
5.2.10.0050.0298.97
5.2.00.0040.0438.84
5.1.60.0050.0368.12
5.1.50.0080.0278.11
5.1.40.0050.0378.10
5.1.30.0100.0338.45
5.1.20.0060.0258.47
5.1.10.0060.0258.19
5.1.00.0040.0258.19
5.0.50.0000.0246.68
5.0.40.0050.0206.53
5.0.30.0050.0326.34
5.0.20.0020.0246.31
5.0.10.0030.0356.29
5.0.00.0030.0366.29
4.4.90.0020.0174.78
4.4.80.0020.0164.75
4.4.70.0040.0144.75
4.4.60.0040.0144.76
4.4.50.0030.0154.77
4.4.40.0040.0274.71
4.4.30.0030.0184.76
4.4.20.0020.0184.84
4.4.10.0050.0174.85
4.4.00.0030.0294.75
4.3.110.0040.0204.67
4.3.100.0040.0174.66
4.3.90.0000.0184.63
4.3.80.0020.0264.59
4.3.70.0020.0184.63
4.3.60.0050.0214.63
4.3.50.0040.0184.63
4.3.40.0050.0274.54
4.3.30.0050.0193.34
4.3.20.0030.0203.32
4.3.10.0050.0143.29
4.3.00.0000.0236.76

preferences:
57.37 ms | 401 KiB | 5 Q