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');$D->test('C');

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.70.0040.01116.58
8.3.60.0030.01416.63
8.3.50.0050.01322.90
8.3.40.0150.00018.67
8.3.30.0110.00419.11
8.3.20.0070.00020.16
8.3.10.0040.00421.95
8.3.00.0080.00017.63
8.2.180.0210.00016.63
8.2.170.0090.00622.96
8.2.160.0070.00720.38
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0120.00326.16
8.2.120.0030.00520.97
8.2.110.0000.00920.84
8.2.100.0090.00317.91
8.2.90.0040.00419.08
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0000.00818.00
8.2.50.0040.00418.10
8.2.40.0000.00718.22
8.2.30.0050.00317.97
8.2.20.0040.00417.73
8.2.10.0040.00417.96
8.2.00.0050.00317.66
8.1.280.0070.00725.92
8.1.270.0040.00423.70
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0120.00622.47
8.1.230.0070.00717.71
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0090.00017.22
8.1.180.0000.00818.10
8.1.170.0040.00418.40
8.1.160.0040.00421.90
8.1.150.0000.00818.71
8.1.140.0080.00017.22
8.1.130.0030.00317.80
8.1.120.0040.00417.30
8.1.110.0050.00217.39
8.1.100.0070.00017.35
8.1.90.0030.00517.34
8.1.80.0000.00717.36
8.1.70.0030.00317.34
8.1.60.0060.00317.57
8.1.50.0050.00317.52
8.1.40.0040.00417.41
8.1.30.0000.00817.68
8.1.20.0030.00617.68
8.1.10.0070.00017.59
8.1.00.0040.00417.55
8.0.300.0050.00319.94
8.0.290.0000.00716.63
8.0.280.0070.00018.34
8.0.270.0000.00717.25
8.0.260.0030.00317.30
8.0.250.0050.00217.01
8.0.240.0030.00317.00
8.0.230.0050.00316.84
8.0.220.0040.00416.88
8.0.210.0030.00316.91
8.0.200.0060.00016.84
8.0.190.0000.00716.99
8.0.180.0030.00516.80
8.0.170.0050.00516.90
8.0.160.0050.00216.86
8.0.150.0000.00716.74
8.0.140.0050.00516.82
8.0.130.0000.00713.31
8.0.120.0000.00816.86
8.0.110.0020.00516.87
8.0.100.0070.00016.73
8.0.90.0040.00416.71
8.0.80.0090.00916.89
8.0.70.0000.00716.75
8.0.60.0000.00716.78
8.0.50.0040.00416.74
8.0.30.0150.00317.07
8.0.20.0100.00917.41
8.0.10.0030.00616.99
8.0.00.0110.00816.92
7.4.330.0050.00015.00
7.4.320.0030.00316.38
7.4.300.0030.00316.55
7.4.290.0040.00416.59
7.4.280.0000.00816.48
7.4.270.0000.00816.49
7.4.260.0000.00816.48
7.4.250.0040.00416.51
7.4.240.0010.00616.56
7.4.230.0000.00716.53
7.4.220.0120.00916.45
7.4.210.0070.01016.63
7.4.200.0030.00316.62
7.4.160.0110.00716.45
7.4.150.0120.01217.40
7.4.140.0070.01017.86
7.4.130.0080.00816.48
7.4.120.0060.01116.56
7.4.110.0030.01316.33
7.4.100.0100.00716.35
7.4.90.0160.00716.59
7.4.80.0120.00919.39
7.4.70.0060.00916.38
7.4.60.0030.01316.56
7.4.50.0090.00016.23
7.4.40.0100.00716.53
7.4.30.0130.00316.63
7.4.00.0090.00614.77
7.3.330.0000.00513.22
7.3.320.0000.00513.24
7.3.310.0030.00316.25
7.3.300.0030.00316.31
7.3.290.0100.00416.41
7.3.280.0090.00916.39
7.3.270.0080.00817.40
7.3.260.0120.00616.48
7.3.250.0180.00016.55
7.3.240.0120.00816.61
7.3.230.0070.01116.39
7.3.210.0040.01316.47
7.3.200.0130.00419.39
7.3.190.0100.01216.49
7.3.180.0100.01316.56
7.3.170.0060.00916.51
7.3.160.0080.00816.46
7.3.10.0100.00316.55
7.3.00.0100.00316.48
7.2.330.0190.00016.79
7.2.320.0070.01016.67
7.2.310.0130.00316.75
7.2.300.0050.01116.77
7.2.290.0130.00316.63
7.2.130.0080.00416.87
7.2.120.0000.01216.72
7.2.110.0040.00716.98
7.2.100.0040.00716.64
7.2.90.0070.00416.80
7.2.80.0110.00416.92
7.2.70.0070.00716.86
7.2.60.0020.01016.73
7.2.50.0060.01016.94
7.2.40.0000.01016.57
7.2.30.0030.00717.13
7.2.20.0110.00416.95
7.2.10.0100.00316.78
7.2.00.0040.00816.57
7.1.250.0000.00815.71
7.1.200.0090.00615.79
7.1.100.0040.01118.07
7.1.70.0040.00717.11
7.1.60.0060.01819.40
7.1.50.0040.01516.89
7.1.00.0030.07722.49
7.0.200.0050.00316.66
7.0.140.0000.07322.07
7.0.60.0030.04320.02
7.0.50.0170.03717.86
7.0.40.0070.05020.05
7.0.30.0400.06320.16
7.0.20.0100.07720.07
7.0.10.0100.09020.19
7.0.00.0030.08720.12
5.6.280.0100.06721.00
5.6.210.0130.07720.51
5.6.200.0070.07718.16
5.6.190.0200.03020.61
5.6.180.0270.05320.41
5.6.170.0270.07320.52
5.6.160.0100.08320.48
5.6.150.0000.04318.21
5.6.140.0070.08018.24
5.6.130.0170.06718.17
5.6.120.0030.04021.15
5.6.110.0000.09020.99
5.6.100.0130.06720.98
5.6.90.0200.04320.95
5.6.80.0070.07320.53
5.5.350.0270.07320.39
5.5.340.0130.07317.95
5.5.330.0030.05320.29
5.5.320.0200.08020.20
5.5.310.0270.04020.27
5.5.300.0070.06717.98
5.5.290.0070.08017.98
5.5.280.0100.08320.77
5.5.270.0170.07720.98
5.5.260.0170.07320.85
5.5.250.0170.07020.70
5.5.240.0030.07320.27
5.4.450.1070.06319.55
5.4.440.0630.05719.63
5.4.430.0600.05319.47
5.4.420.0670.05719.48
5.4.410.0630.05319.50
5.4.400.0300.05318.77
5.4.390.0270.06718.63
5.4.380.0070.06018.76
5.4.370.0070.04718.64
5.4.360.0070.04318.70
5.4.350.0070.04312.03
5.4.340.0080.04312.02
5.4.320.0030.04612.50
5.4.310.0090.04112.50
5.4.300.0100.04212.50
5.4.290.0100.05212.50
5.4.280.0060.04212.40
5.4.270.0030.04112.40
5.4.260.0060.03912.40
5.4.250.0070.03612.40
5.4.240.0060.03612.39
5.4.230.0030.04112.39
5.4.220.0050.03712.39
5.4.210.0020.04012.39
5.4.200.0060.03712.39
5.4.190.0050.03712.38
5.4.180.0080.04212.39
5.4.170.0040.03812.40
5.4.160.0050.03712.39
5.4.150.0050.04312.39
5.4.140.0050.04112.08
5.4.130.0090.03412.06
5.4.120.0070.04012.02
5.4.110.0080.03712.02
5.4.100.0140.04512.01
5.4.90.0050.03912.02
5.4.80.0060.03812.02
5.4.70.0100.03212.01
5.4.60.0090.03312.01
5.4.50.0070.03512.01
5.4.40.0090.03712.00
5.4.30.0060.04812.00
5.4.20.0030.03812.00
5.4.10.0080.04412.00
5.4.00.0070.03911.49
5.3.290.0050.04412.80
5.3.280.0080.04212.71
5.3.270.0100.04012.73
5.3.260.0060.03912.72
5.3.250.0030.04112.72
5.3.240.0080.03612.72
5.3.230.0090.03512.71
5.3.220.0080.03512.68
5.3.210.0090.03612.68
5.3.200.0060.03712.68
5.3.190.0070.03712.68
5.3.180.0070.03712.67
5.3.170.0100.03312.67
5.3.160.0050.04412.67
5.3.150.0090.04212.68
5.3.140.0080.04512.66
5.3.130.0090.05012.66
5.3.120.0100.03612.66
5.3.110.0060.04512.66
5.3.100.0080.03812.13
5.3.90.0040.04912.11
5.3.80.0090.04812.10
5.3.70.0120.04612.10
5.3.60.0060.04312.08
5.3.50.0050.05012.03
5.3.40.0080.04912.03
5.3.30.0090.04411.99
5.3.20.0050.05111.77
5.3.10.0070.04911.74
5.3.00.0070.03811.73
5.2.170.0080.0319.23
5.2.160.0050.0309.22
5.2.150.0050.0339.22
5.2.140.0060.0389.22
5.2.130.0080.0309.18
5.2.120.0070.0279.18
5.2.110.0020.0319.19
5.2.100.0050.0299.19
5.2.90.0060.0289.19
5.2.80.0010.0349.18
5.2.70.0040.0319.18
5.2.60.0060.0429.14
5.2.50.0070.0309.10
5.2.40.0100.0299.08
5.2.30.0050.0389.06
5.2.20.0060.0369.05
5.2.10.0060.0388.95
5.2.00.0080.0358.81
5.1.60.0040.0308.09
5.1.50.0060.0278.09
5.1.40.0060.0238.07
5.1.30.0010.0298.42
5.1.20.0040.0278.45
5.1.10.0030.0348.17
5.1.00.0080.0268.17
5.0.50.0040.0286.65
5.0.40.0060.0246.51
5.0.30.0030.0316.32
5.0.20.0050.0186.29
5.0.10.0040.0196.27
5.0.00.0100.0316.26
4.4.90.0030.0204.78
4.4.80.0060.0124.75
4.4.70.0050.0144.75
4.4.60.0020.0174.75
4.4.50.0020.0164.77
4.4.40.0030.0254.70
4.4.30.0020.0164.76
4.4.20.0060.0124.85
4.4.10.0020.0164.85
4.4.00.0020.0254.76
4.3.110.0050.0134.67
4.3.100.0020.0154.67
4.3.90.0040.0134.64
4.3.80.0030.0244.59
4.3.70.0040.0214.63
4.3.60.0050.0124.63
4.3.50.0040.0144.63
4.3.40.0050.0254.54
4.3.30.0020.0163.30
4.3.20.0000.0203.28
4.3.10.0030.0153.24
4.3.00.0170.0307.15

preferences:
47.63 ms | 401 KiB | 5 Q