3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A {} class D { protected function test1($class_name) { echo $class_name, "\n"; return 'BLAH'; } public function test($class_name) { return new $class_name($this->test1($class_name)); } } $D = new D; $D->test('A'); $D->test('D');

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.40.0070.00718.71
8.3.30.0150.00618.97
8.3.20.0050.00220.37
8.3.10.0040.00421.74
8.3.00.0080.00017.38
8.2.170.0110.00422.96
8.2.160.0090.00620.53
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0060.00326.16
8.2.120.0050.00321.15
8.2.110.0060.00322.25
8.2.100.0070.00419.52
8.2.90.0070.00019.22
8.2.80.0050.00317.97
8.2.70.0050.00317.63
8.2.60.0070.00417.80
8.2.50.0030.00618.07
8.2.40.0040.00418.22
8.2.30.0080.00018.09
8.2.20.0040.00417.73
8.2.10.0040.00418.12
8.2.00.0070.00017.65
8.1.270.0040.00423.96
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0000.00924.03
8.1.230.0040.00719.16
8.1.220.0080.00017.74
8.1.210.0090.00018.77
8.1.200.0030.00617.10
8.1.190.0040.00417.23
8.1.180.0000.00918.10
8.1.170.0050.00318.51
8.1.160.0040.00421.95
8.1.150.0040.00418.73
8.1.140.0080.00017.32
8.1.130.0030.00317.67
8.1.120.0000.00717.47
8.1.110.0040.00417.38
8.1.100.0040.00417.38
8.1.90.0000.00717.30
8.1.80.0070.00017.30
8.1.70.0000.00817.34
8.1.60.0040.00417.47
8.1.50.0040.00417.42
8.1.40.0030.00517.52
8.1.30.0000.00917.66
8.1.20.0050.00317.55
8.1.10.0040.00417.57
8.1.00.0000.00717.49
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00718.40
8.0.270.0050.00517.31
8.0.260.0060.00017.32
8.0.250.0020.00516.86
8.0.240.0000.00716.84
8.0.230.0000.00716.91
8.0.220.0040.00416.84
8.0.210.0000.00716.77
8.0.200.0060.00016.81
8.0.190.0040.00416.75
8.0.180.0000.00716.86
8.0.170.0000.00816.82
8.0.160.0040.00416.82
8.0.150.0000.00716.75
8.0.140.0000.00716.68
8.0.130.0000.00513.29
8.0.120.0040.00416.81
8.0.110.0070.00016.82
8.0.100.0040.00416.72
8.0.90.0000.00716.63
8.0.80.0120.00916.78
8.0.70.0070.00016.67
8.0.60.0050.00316.74
8.0.50.0000.00716.84
8.0.30.0140.01117.02
8.0.20.0090.00917.40
8.0.10.0070.00016.98
8.0.00.0110.00916.69
7.4.330.0050.00015.00
7.4.320.0060.00016.44
7.4.300.0030.00316.51
7.4.290.0030.00316.61
7.4.280.0030.00616.51
7.4.270.0040.00416.52
7.4.260.0080.00016.48
7.4.250.0040.00416.45
7.4.240.0040.00416.55
7.4.230.0070.00016.59
7.4.220.0120.00616.54
7.4.210.0060.00916.52
7.4.200.0000.00716.34
7.4.160.0040.01116.59
7.4.150.0140.00317.40
7.4.140.0110.00617.86
7.4.130.0110.00516.58
7.4.120.0120.00616.58
7.4.110.0070.01116.78
7.4.100.0090.00916.53
7.4.90.0130.00316.46
7.4.80.0090.00919.39
7.4.70.0030.01416.46
7.4.60.0140.00716.52
7.4.50.0030.00616.22
7.4.40.0110.00616.49
7.4.30.0060.00916.59
7.4.00.0100.00714.52
7.3.330.0030.00313.30
7.3.320.0030.00313.30
7.3.310.0000.00616.14
7.3.300.0070.00016.18
7.3.290.0070.01416.27
7.3.280.0070.00916.28
7.3.270.0070.01017.40
7.3.260.0060.01116.57
7.3.250.0080.00816.31
7.3.240.0060.01016.20
7.3.230.0040.01616.49
7.3.210.0100.00716.19
7.3.200.0130.00419.39
7.3.190.0100.00616.49
7.3.180.0070.01016.57
7.3.170.0050.01116.59
7.3.160.0050.01016.50
7.2.330.0030.01316.57
7.2.320.0110.00516.85
7.2.310.0070.01416.46
7.2.300.0060.01016.79
7.2.290.0100.00716.50
7.2.60.0040.01216.73
7.2.00.0030.01019.34
7.1.200.0230.00015.68
7.1.100.0080.00517.88
7.1.70.0070.01416.98
7.1.60.0140.01019.40
7.1.50.0080.01216.62
7.1.00.0070.07322.39
7.0.200.0000.00716.79
7.0.140.0070.07022.09
7.0.60.0070.08019.93
7.0.50.0100.08317.89
7.0.40.0000.06020.09
7.0.30.0300.09020.30
7.0.20.0230.05320.09
7.0.10.0070.08320.12
7.0.00.0070.03720.09
5.6.280.0000.07721.09
5.6.210.0100.07720.77
5.6.200.0030.04718.18
5.6.190.0030.09020.39
5.6.180.0230.04320.49
5.6.170.0100.08020.71
5.6.160.0070.04320.52
5.6.150.0130.06018.23
5.6.140.0100.08318.14
5.6.130.0100.06318.18
5.6.120.0130.07721.02
5.6.110.0030.04321.03
5.6.100.0000.07321.00
5.6.90.0070.09021.00
5.6.80.0070.03320.39
5.5.350.4370.04020.41
5.5.340.0000.09017.92
5.5.330.0170.07020.42
5.5.320.0430.07320.35
5.5.310.0370.07320.29
5.5.300.0100.05017.94
5.5.290.0130.07018.02
5.5.280.0130.08020.98
5.5.270.0100.05320.82
5.5.260.0200.06320.94
5.5.250.0100.06020.70
5.5.240.0100.08020.29
5.4.450.0370.05719.54
5.4.440.0200.05019.41
5.4.430.0400.03719.32
5.4.420.0130.04019.53
5.4.410.0330.04319.29
5.4.400.0330.03319.00
5.4.390.0400.03719.08
5.4.380.0370.04718.81
5.4.370.0400.06018.80
5.4.360.0270.06018.81
5.4.350.0230.06018.79
5.4.340.0370.04718.62
5.4.320.0050.03812.50
5.4.310.0070.04512.50
5.4.300.0120.05112.50
5.4.290.0120.04912.50
5.4.280.0130.04712.40
5.4.270.0140.04512.40
5.4.260.0070.04412.40
5.4.250.0060.03912.40
5.4.240.0060.04912.39
5.4.230.0070.05112.39
5.4.220.0070.04612.39
5.4.210.0120.04212.39
5.4.200.0050.04212.39
5.4.190.0050.03812.39
5.4.180.0040.04312.39
5.4.170.0090.03312.40
5.4.160.0080.03612.39
5.4.150.0050.03712.39
5.4.140.0070.04312.07
5.4.130.0060.03612.06
5.4.120.0060.03412.02
5.4.110.0080.03712.02
5.4.100.0050.03712.02
5.4.90.0060.03612.02
5.4.80.0060.03712.02
5.4.70.0040.03712.02
5.4.60.0080.03912.01
5.4.50.0080.03912.01
5.4.40.0100.03912.00
5.4.30.0090.03912.00
5.4.20.0090.03612.00
5.4.10.0070.03412.00
5.4.00.0110.03111.48
5.3.290.0080.04012.80
5.3.280.0070.03812.71
5.3.270.0060.03912.73
5.3.260.0080.03712.72
5.3.250.0050.05512.72
5.3.240.0090.05312.72
5.3.230.0060.04212.71
5.3.220.0040.04112.68
5.3.210.0070.04212.68
5.3.200.0090.04112.68
5.3.190.0060.04112.68
5.3.180.0060.04012.67
5.3.170.0080.03412.67
5.3.160.0120.04012.67
5.3.150.0060.05112.68
5.3.140.0100.04612.66
5.3.130.0120.04412.65
5.3.120.0070.04312.66
5.3.110.0050.04712.65
5.3.100.0070.04212.12
5.3.90.0060.03712.11
5.3.80.0080.03512.10
5.3.70.0110.03612.10
5.3.60.0090.03612.08
5.3.50.0070.03412.03
5.3.40.0070.03612.03
5.3.30.0090.03411.99
5.3.20.0040.03811.77
5.3.10.0070.03411.74
5.3.00.0090.03511.72
5.2.170.0040.0339.22
5.2.160.0090.0279.22
5.2.150.0070.0299.22
5.2.140.0100.0319.22
5.2.130.0080.0309.18
5.2.120.0020.0339.18
5.2.110.0060.0339.19
5.2.100.0040.0329.18
5.2.90.0040.0299.18
5.2.80.0030.0329.18
5.2.70.0050.0339.17
5.2.60.0060.0359.13
5.2.50.0110.0309.10
5.2.40.0040.0299.07
5.2.30.0040.0329.05
5.2.20.0040.0319.04
5.2.10.0070.0368.95
5.2.00.0070.0318.81
5.1.60.0060.0348.09
5.1.50.0060.0338.09
5.1.40.0060.0348.07
5.1.30.0020.0398.42
5.1.20.0070.0238.44
5.1.10.0050.0258.17
5.1.00.0030.0278.16
5.0.50.0060.0256.65
5.0.40.0020.0206.50
5.0.30.0040.0356.32
5.0.20.0040.0276.29
5.0.10.0010.0236.26
5.0.00.0040.0356.25
4.4.90.0040.0214.78
4.4.80.0020.0234.75
4.4.70.0060.0174.76
4.4.60.0030.0154.75
4.4.50.0020.0164.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0030.0154.85
4.4.10.0010.0174.85
4.4.00.0020.0264.76
4.3.110.0030.0154.67
4.3.100.0040.0144.66
4.3.90.0030.0144.63
4.3.80.0030.0244.59
4.3.70.0040.0134.63
4.3.60.0020.0154.63
4.3.50.0020.0164.63
4.3.40.0040.0224.54
4.3.30.0020.0163.30
4.3.20.0000.0173.28
4.3.10.0030.0143.23
4.3.00.0070.02015.91

preferences:
33.66 ms | 400 KiB | 5 Q