3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function __construct() { } } class D { protected function test1() { echo "called\n"; return 'BLAH'; } public function test($class_name) { return new $class_name($this->test1()); } } $D = new D; var_dump($D->test('A')); var_dump($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.75
8.3.50.0210.00922.94
8.3.40.0180.00018.87
8.3.30.0110.00419.22
8.3.20.0040.00420.34
8.3.10.0040.00421.66
8.3.00.0050.00317.63
8.2.180.0110.01116.75
8.2.170.0070.00722.96
8.2.160.0090.00620.35
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00821.12
8.2.110.0100.00022.01
8.2.100.0080.00417.91
8.2.90.0000.00918.88
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0000.00817.93
8.2.50.0060.00318.07
8.2.40.0030.00618.09
8.2.30.0050.00318.02
8.2.20.0050.00317.67
8.2.10.0030.00518.11
8.2.00.0060.00317.81
8.1.280.0140.00025.92
8.1.270.0060.00323.92
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00323.84
8.1.230.0040.00719.22
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0100.00017.22
8.1.190.0080.00017.10
8.1.180.0050.00318.10
8.1.170.0000.00818.27
8.1.160.0040.00422.01
8.1.150.0080.00018.81
8.1.140.0000.00717.43
8.1.130.0070.00017.84
8.1.120.0040.00417.33
8.1.110.0050.00317.36
8.1.100.0000.00817.42
8.1.90.0040.00317.43
8.1.80.0030.00417.38
8.1.70.0060.00317.28
8.1.60.0090.00017.60
8.1.50.0060.00317.39
8.1.40.0040.00417.44
8.1.30.0040.00417.62
8.1.20.0000.00817.65
8.1.10.0080.00017.47
8.1.00.0050.00317.51
8.0.300.0030.00618.77
8.0.290.0000.00716.75
8.0.280.0030.00318.46
8.0.270.0030.00517.32
8.0.260.0030.00317.26
8.0.250.0000.00716.98
8.0.240.0000.00716.97
8.0.230.0070.00016.91
8.0.220.0040.00316.80
8.0.210.0030.00516.87
8.0.200.0030.00316.95
8.0.190.0000.00716.86
8.0.180.0000.00716.94
8.0.170.0000.00816.98
8.0.160.0040.00416.89
8.0.150.0070.00016.81
8.0.140.0000.00916.77
8.0.130.0050.00013.27
8.0.120.0030.00516.84
8.0.110.0070.00016.97
8.0.100.0000.00716.80
8.0.90.0040.00416.92
8.0.80.0000.01816.93
8.0.70.0000.00716.81
8.0.60.0070.00016.97
8.0.50.0000.00716.73
8.0.30.0070.01217.18
8.0.20.0110.00717.40
8.0.10.0080.00016.92
8.0.00.0060.01116.76
7.4.330.0030.00315.09
7.4.320.0030.00316.56
7.4.300.0060.00016.50
7.4.290.0030.00316.54
7.4.280.0080.00016.62
7.4.270.0000.00716.60
7.4.260.0030.00316.57
7.4.250.0030.00516.48
7.4.240.0030.00516.49
7.4.230.0000.00816.55
7.4.220.0030.01816.50
7.4.210.0060.01316.55
7.4.200.0080.00016.66
7.4.160.0090.00616.39
7.4.150.0070.01117.40
7.4.140.0060.01217.86
7.4.130.0100.01016.50
7.4.120.0070.01016.63
7.4.110.0090.00916.38
7.4.100.0200.00016.77
7.4.90.0080.00816.56
7.4.80.0040.01819.39
7.4.70.0060.01216.54
7.4.60.0110.00616.55
7.4.50.0090.00016.39
7.4.40.0050.01616.54
7.4.30.0040.01216.52
7.4.00.0040.00714.84
7.3.330.0000.00513.22
7.3.320.0000.00613.44
7.3.310.0000.00616.60
7.3.300.0000.00716.31
7.3.290.0070.00716.44
7.3.280.0100.00916.40
7.3.270.0120.00617.40
7.3.260.0090.00916.43
7.3.250.0120.00516.39
7.3.240.0110.01116.43
7.3.230.0120.01216.50
7.3.210.0060.01216.46
7.3.200.0100.00719.39
7.3.190.0060.01216.66
7.3.180.0090.00916.48
7.3.170.0060.00916.53
7.3.160.0060.01016.44
7.3.120.0150.00014.93
7.3.110.0140.00315.01
7.3.100.0070.00714.65
7.3.90.0000.01414.94
7.3.80.0090.00615.18
7.3.70.0030.00915.07
7.3.60.0070.00714.67
7.3.50.0000.01314.84
7.3.40.0090.00314.77
7.3.30.0100.00314.69
7.3.20.0060.00616.57
7.3.10.0070.00416.68
7.3.00.0000.01116.56
7.2.330.0060.01016.21
7.2.320.0060.01116.79
7.2.310.0090.00616.43
7.2.300.0100.00716.63
7.2.290.0120.00916.80
7.2.240.0060.00614.93
7.2.230.0090.00914.80
7.2.220.0030.01214.92
7.2.210.0000.01615.26
7.2.200.0100.00715.05
7.2.190.0110.00715.05
7.2.180.0070.01015.04
7.2.170.0100.00715.19
7.2.160.0000.01615.02
7.2.150.0150.00416.88
7.2.140.0070.01016.53
7.2.130.0000.01917.05
7.2.120.0040.01116.71
7.2.110.0030.00716.89
7.2.100.0070.01016.90
7.2.90.0070.00716.65
7.2.80.0040.00416.99
7.2.70.0100.00616.86
7.2.60.0040.01216.74
7.2.50.0030.00916.98
7.2.40.0100.00716.98
7.2.30.0060.00617.16
7.2.20.0060.00916.63
7.2.10.0100.00716.67
7.2.00.0080.00318.24
7.1.330.0070.01015.88
7.1.320.0080.00815.65
7.1.310.0000.01015.55
7.1.300.0000.01315.77
7.1.290.0100.00315.78
7.1.280.0110.00415.80
7.1.270.0070.00715.54
7.1.260.0000.01415.86
7.1.250.0030.01315.41
7.1.200.0000.01115.56
7.1.100.0070.00718.31
7.1.70.0050.00316.87
7.1.60.0170.00719.40
7.1.50.0060.01016.93
7.1.00.0030.07722.27
7.0.200.0130.00316.46
7.0.140.0000.07722.00
7.0.60.0170.07319.95
7.0.50.0130.04317.80
7.0.40.0030.06320.29
7.0.30.0200.06720.10
7.0.20.0330.07720.23
7.0.10.0030.04720.07
7.0.00.0030.06720.16
5.6.280.0070.07020.90
5.6.210.0030.08720.56
5.6.200.0170.07718.15
5.6.190.0100.08720.33
5.6.180.0270.06020.63
5.6.170.0300.07720.56
5.6.160.0130.06720.70
5.6.150.0070.08318.27
5.6.140.0030.04718.28
5.6.130.0000.04318.21
5.6.120.0070.05021.00
5.6.110.0100.07721.03
5.6.100.0070.08720.99
5.6.90.0000.05021.04
5.6.80.0070.04720.51
5.5.350.0030.06720.39
5.5.340.0070.06717.94
5.5.330.0100.03720.45
5.5.320.0330.05320.35
5.5.310.0330.08720.24
5.5.300.0170.06718.03
5.5.290.0070.05717.98
5.5.280.0100.03720.66
5.5.270.0030.05020.89
5.5.260.0100.08320.89
5.5.250.0100.06020.59
5.5.240.0270.06020.27
5.4.450.0500.04019.48
5.4.440.0470.03319.48
5.4.430.0230.04719.38
5.4.420.0270.04319.27
5.4.410.0330.04019.20
5.4.400.0770.02719.20
5.4.390.0070.03318.95
5.4.380.0830.05018.53
5.4.370.0900.04318.72
5.4.360.0630.06318.74
5.4.350.0600.05318.65
5.4.340.0830.05018.73
5.4.320.0080.03412.50
5.4.310.0060.03912.50
5.4.300.0060.03812.50
5.4.290.0060.04812.50
5.4.280.0100.03412.40
5.4.270.0070.03812.40
5.4.260.0020.04212.40
5.4.250.0090.03412.40
5.4.240.0090.03712.40
5.4.230.0060.03712.39
5.4.220.0060.03812.39
5.4.210.0060.04212.39
5.4.200.0060.03712.39
5.4.190.0060.03612.38
5.4.180.0060.04212.39
5.4.170.0040.04012.40
5.4.160.0070.03412.39
5.4.150.0040.03712.39
5.4.140.0080.03412.07
5.4.130.0050.03612.06
5.4.120.0060.04112.02
5.4.110.0060.03512.01
5.4.100.0070.03412.02
5.4.90.0060.03612.02
5.4.80.0080.03412.01
5.4.70.0020.03812.01
5.4.60.0060.03512.02
5.4.50.0040.03612.01
5.4.40.0040.03612.00
5.4.30.0080.03312.00
5.4.20.0080.04312.00
5.4.10.0060.03411.99
5.4.00.0050.03711.49
5.3.290.0090.03812.80
5.3.280.0060.03812.71
5.3.270.0040.04212.72
5.3.260.0060.04012.72
5.3.250.0050.03712.72
5.3.240.0080.03512.71
5.3.230.0070.03712.71
5.3.220.0070.03612.68
5.3.210.0070.03812.68
5.3.200.0070.03612.68
5.3.190.0030.04112.68
5.3.180.0070.03612.67
5.3.170.0120.04112.66
5.3.160.0100.03912.67
5.3.150.0120.03412.67
5.3.140.0060.03812.66
5.3.130.0050.03912.66
5.3.120.0030.04112.66
5.3.110.0070.03812.66
5.3.100.0040.03812.12
5.3.90.0070.03412.11
5.3.80.0050.03812.10
5.3.70.0070.03612.10
5.3.60.0040.03812.09
5.3.50.0080.03412.04
5.3.40.0060.04112.03
5.3.30.0060.03611.98
5.3.20.0040.03611.77
5.3.10.0060.03511.73
5.3.00.0040.03811.73
5.2.170.0030.0339.23
5.2.160.0060.0289.23
5.2.150.0040.0329.23
5.2.140.0060.0299.23
5.2.130.0020.0359.18
5.2.120.0070.0289.18
5.2.110.0070.0289.19
5.2.100.0040.0299.19
5.2.90.0100.0249.19
5.2.80.0050.0299.18
5.2.70.0040.0329.18
5.2.60.0030.0319.13
5.2.50.0060.0299.10
5.2.40.0040.0299.08
5.2.30.0030.0319.06
5.2.20.0060.0299.04
5.2.10.0040.0298.95
5.2.00.0050.0338.82
5.1.60.0040.0288.10
5.1.50.0040.0268.09
5.1.40.0070.0218.07
5.1.30.0020.0288.42
5.1.20.0040.0278.45
5.1.10.0060.0248.17
5.1.00.0070.0278.18
5.0.50.0040.0206.65
5.0.40.0030.0196.50
5.0.30.0030.0316.32
5.0.20.0020.0206.29
5.0.10.0020.0216.27
5.0.00.0030.0306.26
4.4.90.0030.0154.78
4.4.80.0020.0154.75
4.4.70.0020.0154.75
4.4.60.0010.0194.75
4.4.50.0030.0194.77
4.4.40.0050.0264.71
4.4.30.0020.0174.76
4.4.20.0020.0174.84
4.4.10.0010.0174.84
4.4.00.0010.0264.75
4.3.110.0030.0154.67
4.3.100.0020.0154.67
4.3.90.0030.0134.63
4.3.80.0040.0224.59
4.3.70.0040.0134.63
4.3.60.0020.0154.63
4.3.50.0020.0164.63
4.3.40.0040.0234.54
4.3.30.0020.0163.30
4.3.20.0030.0153.28
4.3.10.0040.0153.24
4.3.00.0070.01315.91

preferences:
39.95 ms | 401 KiB | 5 Q