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('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.60.0040.01416.63
8.3.50.0090.00622.83
8.3.40.0110.00418.83
8.3.30.0080.00618.78
8.3.20.0000.00720.21
8.3.10.0050.00321.78
8.3.00.0050.00317.48
8.2.180.0080.00816.48
8.2.170.0150.00622.96
8.2.160.0100.00320.39
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0070.00726.16
8.2.120.0000.00721.18
8.2.110.0060.00322.17
8.2.100.0040.00819.32
8.2.90.0000.00819.26
8.2.80.0000.00817.97
8.2.70.0000.00817.61
8.2.60.0080.00018.03
8.2.50.0030.00618.07
8.2.40.0060.00318.09
8.2.30.0000.00817.94
8.2.20.0000.00817.80
8.2.10.0040.00418.09
8.2.00.0000.00717.81
8.1.280.0100.01325.92
8.1.270.0060.00323.71
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00323.95
8.1.230.0090.00319.06
8.1.220.0080.00017.79
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0050.00317.13
8.1.180.0000.00818.10
8.1.170.0040.00418.46
8.1.160.0000.00721.87
8.1.150.0000.00718.70
8.1.140.0000.00817.38
8.1.130.0030.00317.87
8.1.120.0070.00017.39
8.1.110.0030.00317.36
8.1.100.0000.00717.30
8.1.90.0030.00717.29
8.1.80.0040.00417.37
8.1.70.0070.00017.29
8.1.60.0040.00417.49
8.1.50.0000.00917.48
8.1.40.0050.00217.43
8.1.30.0000.00917.69
8.1.20.0020.00517.55
8.1.10.0050.00317.57
8.1.00.0040.00417.37
8.0.300.0000.00918.77
8.0.290.0070.00016.75
8.0.280.0000.00718.32
8.0.270.0000.00716.89
8.0.260.0040.00417.25
8.0.250.0070.00017.03
8.0.240.0030.00317.06
8.0.230.0000.00716.82
8.0.220.0040.00416.80
8.0.210.0030.00516.93
8.0.200.0000.00616.84
8.0.190.0040.00416.83
8.0.180.0070.00016.96
8.0.170.0020.00516.96
8.0.160.0000.00716.84
8.0.150.0030.00516.84
8.0.140.0050.00316.75
8.0.130.0030.00313.32
8.0.120.0000.00916.88
8.0.110.0040.00416.85
8.0.100.0000.00716.93
8.0.90.0000.00716.96
8.0.80.0120.01016.94
8.0.70.0040.00417.01
8.0.60.0000.00816.73
8.0.50.0070.00016.96
8.0.30.0120.00917.04
8.0.20.0080.01217.40
8.0.10.0000.00717.02
8.0.00.0120.00816.89
7.4.330.0000.00515.08
7.4.320.0030.00316.34
7.4.300.0030.00316.41
7.4.290.0000.00716.50
7.4.280.0040.00416.40
7.4.270.0000.00716.45
7.4.260.0000.00816.37
7.4.250.0000.00816.46
7.4.240.0020.00516.58
7.4.230.0000.00716.55
7.4.220.0110.00716.50
7.4.210.0100.00716.63
7.4.200.0070.00016.54
7.4.160.0090.00616.46
7.4.150.0060.01217.40
7.4.140.0080.01417.86
7.4.130.0140.00316.77
7.4.120.0120.00516.48
7.4.110.0060.01216.67
7.4.100.0070.01016.49
7.4.90.0040.01316.56
7.4.80.0070.01419.39
7.4.70.0130.01116.65
7.4.60.0150.00316.41
7.4.50.0030.00316.56
7.4.40.0090.00616.27
7.4.30.0040.01916.49
7.4.00.0060.00915.09
7.3.330.0000.00713.47
7.3.320.0030.00313.23
7.3.310.0030.00316.46
7.3.300.0050.00316.43
7.3.290.0070.00716.36
7.3.280.0050.01016.39
7.3.270.0070.01117.40
7.3.260.0130.00416.41
7.3.250.0150.00516.43
7.3.240.0120.00616.32
7.3.230.0090.00616.39
7.3.210.0070.01016.42
7.3.200.0070.01019.39
7.3.190.0090.00616.42
7.3.180.0080.00816.40
7.3.170.0030.01416.49
7.3.160.0120.00416.54
7.2.330.0070.01116.73
7.2.320.0130.00616.73
7.2.310.0130.00416.78
7.2.300.0190.00016.66
7.2.290.0120.00316.53
7.2.80.0070.00316.70
7.2.60.0090.00016.96
7.1.200.0060.00615.64
7.1.70.0030.00317.08
7.1.60.0070.01419.40
7.1.50.0000.01216.73
7.1.00.0070.07022.37
7.0.200.0120.00316.66
7.0.140.0030.07321.96
7.0.60.0000.04319.82
7.0.50.0170.04017.83
7.0.40.0000.06020.27
7.0.30.0230.09020.23
7.0.20.0200.07720.26
7.0.10.0130.07720.15
7.0.00.0130.08320.32
5.6.280.0000.07720.92
5.6.210.0100.08020.62
5.6.200.0070.08318.18
5.6.190.0030.04720.63
5.6.180.0300.08320.33
5.6.170.0200.05320.56
5.6.160.0100.03720.45
5.6.150.0070.04018.14
5.6.140.0130.06718.19
5.6.130.0070.08718.14
5.6.120.0030.08721.00
5.6.110.0070.08321.12
5.6.100.0300.07020.89
5.6.90.0070.09021.11
5.6.80.0200.05020.38
5.5.350.0030.08320.45
5.5.340.0100.07717.98
5.5.330.0070.08020.27
5.5.320.0230.04020.35
5.5.310.0170.04720.42
5.5.300.0070.07318.01
5.5.290.0070.08018.07
5.5.280.0000.04720.89
5.5.270.0030.09020.88
5.5.260.0100.07020.71
5.5.250.0030.08720.61
5.5.240.3930.03320.19
5.4.450.0370.04719.46
5.4.440.0200.04719.49
5.4.430.0070.05019.56
5.4.420.0100.05319.38
5.4.410.0200.04319.14
5.4.400.0070.03019.18
5.4.390.0270.04319.13
5.4.380.0070.06318.46
5.4.370.0130.05718.70
5.4.360.0130.05718.79
5.4.350.0170.06018.59
5.4.340.0170.05018.80
5.4.320.0060.04212.50
5.4.310.0040.04112.50
5.4.300.0070.03612.51
5.4.290.0050.03912.50
5.4.280.0080.03312.40
5.4.270.0050.03712.40
5.4.260.0070.03612.40
5.4.250.0060.03612.40
5.4.240.0110.03012.40
5.4.230.0050.03812.39
5.4.220.0040.03712.39
5.4.210.0070.03312.39
5.4.200.0090.03312.39
5.4.190.0040.03612.39
5.4.180.0060.03612.38
5.4.170.0050.03912.40
5.4.160.0040.03712.39
5.4.150.0050.03712.39
5.4.140.0070.03512.07
5.4.130.0040.03712.06
5.4.120.0040.03912.02
5.4.110.0070.03612.02
5.4.100.0090.03112.02
5.4.90.0040.03812.01
5.4.80.0070.04112.02
5.4.70.0080.04112.02
5.4.60.0060.03612.02
5.4.50.0060.03912.01
5.4.40.0040.03712.00
5.4.30.0100.04112.00
5.4.20.0060.05212.00
5.4.10.0060.03412.00
5.4.00.0060.03511.49
5.3.290.0070.04212.80
5.3.280.0100.03412.71
5.3.270.0050.03912.72
5.3.260.0040.04112.72
5.3.250.0040.04112.72
5.3.240.0030.04412.72
5.3.230.0060.04412.71
5.3.220.0050.03712.68
5.3.210.0100.04112.68
5.3.200.0060.05412.68
5.3.190.0060.04212.68
5.3.180.0060.03712.67
5.3.170.0070.04312.67
5.3.160.0060.04312.67
5.3.150.0070.03912.68
5.3.140.0080.03512.66
5.3.130.0070.03912.66
5.3.120.0150.06112.66
5.3.110.0060.04212.66
5.3.100.0050.04012.13
5.3.90.0110.04912.11
5.3.80.0050.05212.10
5.3.70.0150.04012.10
5.3.60.0180.06412.09
5.3.50.0110.05312.03
5.3.40.0090.05612.03
5.3.30.0110.05411.99
5.3.20.0080.05411.77
5.3.10.0110.03011.74
5.3.00.0070.03711.72
5.2.170.0040.0339.22
5.2.160.0040.0329.23
5.2.150.0080.0299.22
5.2.140.0060.0309.22
5.2.130.0050.0309.18
5.2.120.0060.0289.18
5.2.110.0050.0299.19
5.2.100.0070.0279.19
5.2.90.0070.0289.19
5.2.80.0080.0289.18
5.2.70.0060.0309.18
5.2.60.0050.0319.14
5.2.50.0060.0309.11
5.2.40.0050.0299.08
5.2.30.0060.0349.05
5.2.20.0040.0309.05
5.2.10.0080.0278.95
5.2.00.0030.0318.82
5.1.60.0030.0258.09
5.1.50.0040.0258.09
5.1.40.0050.0238.07
5.1.30.0050.0288.43
5.1.20.0030.0328.44
5.1.10.0060.0268.17
5.1.00.0060.0378.17
5.0.50.0060.0206.65
5.0.40.0020.0276.51
5.0.30.0070.0436.32
5.0.20.0050.0236.29
5.0.10.0040.0196.27
5.0.00.0010.0436.26
4.4.90.0020.0234.78
4.4.80.0040.0164.75
4.4.70.0040.0204.75
4.4.60.0040.0204.75
4.4.50.0030.0164.77
4.4.40.0050.0234.71
4.4.30.0040.0144.76
4.4.20.0050.0134.85
4.4.10.0020.0174.85
4.4.00.0050.0234.75
4.3.110.0060.0134.67
4.3.100.0040.0134.66
4.3.90.0040.0134.64
4.3.80.0040.0224.59
4.3.70.0010.0164.63
4.3.60.0030.0144.63
4.3.50.0010.0174.63
4.3.40.0020.0244.54
4.3.30.0010.0163.30
4.3.20.0030.0153.28
4.3.10.0000.0173.23
4.3.00.0030.01715.90

preferences:
46.7 ms | 401 KiB | 5 Q