3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class SuperAbstract { static function create() { return new static(); } } class Extended extends SuperAbstract { private $hello = ''; protected function __construct() { $this->hello = "world"; } public function hello() { return "hello " . $this->hello; } } // works $a = Extended::create(); echo $a->hello(); echo "\n\nNow we'll fail, trying to call 'new' directly:\n"; // can't touch this $b = new Extended();

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.5.10.0110.00816.81
8.5.00.0080.01420.18
8.4.160.0120.01123.82
8.4.150.0030.00014.05
8.4.140.0110.01017.57
8.4.130.0110.01017.78
8.4.120.0120.00620.41
8.4.110.0130.00818.83
8.4.100.0120.00117.97
8.4.90.0130.00818.63
8.4.80.0110.00920.41
8.4.70.0070.00317.88
8.4.60.0140.00618.69
8.4.50.0100.01018.94
8.4.40.0160.00319.67
8.4.30.0160.00320.71
8.4.20.0100.01318.71
8.4.10.0130.00319.71
8.3.280.0100.01018.45
8.3.270.0100.00816.76
8.3.260.0110.00816.95
8.3.250.0160.00219.00
8.3.240.0150.00516.77
8.3.230.0070.00416.76
8.3.220.0110.00718.89
8.3.210.0040.00316.67
8.3.200.0100.00916.58
8.3.190.0090.00417.21
8.3.180.0100.01016.98
8.3.170.0090.00919.12
8.3.160.0110.00717.36
8.3.150.0070.00716.67
8.3.140.0090.00917.28
8.3.130.0060.00316.55
8.3.120.0040.00818.82
8.3.110.0030.00516.88
8.3.100.0060.00316.74
8.3.90.0040.00426.77
8.3.80.0000.01116.88
8.3.70.0120.00316.88
8.3.60.0070.00718.52
8.3.50.0070.01217.63
8.3.40.0100.00518.93
8.3.30.0070.00718.91
8.3.20.0080.00020.90
8.3.10.0050.00319.28
8.3.00.0030.00521.93
8.2.290.0120.00620.71
8.2.280.0100.00918.41
8.2.270.0100.01018.79
8.2.260.0090.00616.73
8.2.250.0130.00616.58
8.2.240.0050.00317.05
8.2.230.0040.00420.94
8.2.220.0090.00024.06
8.2.210.0080.00026.77
8.2.200.0070.00716.88
8.2.190.0140.00616.75
8.2.180.0070.00725.92
8.2.170.0120.00322.96
8.2.160.0100.00320.35
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0080.00026.16
8.2.110.0030.00622.12
8.2.100.0150.00017.91
8.2.90.0040.00417.75
8.2.80.0000.00817.97
8.2.70.0050.00317.80
8.2.60.0040.00418.03
8.2.50.0080.00019.27
8.2.40.0050.00319.49
8.2.30.0070.00019.24
8.2.20.0050.00217.99
8.2.10.0040.00418.75
8.2.00.0040.00419.38
8.1.330.0080.01019.73
8.1.320.0120.00816.05
8.1.310.0000.00818.19
8.1.300.0050.00317.96
8.1.290.0060.00330.84
8.1.280.0110.00425.92
8.1.270.0000.00820.29
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0040.00422.06
8.1.230.0040.00819.01
8.1.220.0000.00917.74
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0040.00817.35
8.1.180.0080.00018.10
8.1.170.0000.00818.34
8.1.160.0040.00418.90
8.1.150.0070.00018.89
8.1.140.0070.00020.27
8.1.130.0030.00320.12
8.1.120.0040.00417.41
8.1.110.0040.00417.41
8.1.100.0000.00917.41
8.1.90.0030.00617.33
8.1.80.0000.00917.29
8.1.70.0000.00817.38
8.1.60.0040.00417.51
8.1.50.0040.00717.54
8.1.40.0040.00417.56
8.1.30.0030.00617.64
8.1.20.0030.00517.63
8.1.10.0000.00717.49
8.1.00.0040.00417.48
8.0.300.0070.00019.86
8.0.290.0080.00016.75
8.0.280.0030.00318.45
8.0.270.0000.00717.18
8.0.260.0030.00318.35
8.0.250.0030.00316.88
8.0.240.0030.00317.04
8.0.230.0070.00017.04
8.0.220.0030.00316.82
8.0.210.0030.00316.84
8.0.200.0060.00016.99
8.0.190.0000.00817.07
8.0.180.0000.00816.99
8.0.170.0050.00316.86
8.0.160.0040.00416.94
8.0.150.0020.00516.90
8.0.140.0050.00216.82
8.0.130.0000.00713.39
8.0.120.0050.00316.82
8.0.110.0040.00416.97
8.0.100.0030.00616.89
8.0.90.0040.00416.78
8.0.80.0120.00916.86
8.0.70.0040.00416.74
8.0.60.0040.00416.77
8.0.50.0030.00516.67
8.0.30.0150.00317.28
8.0.20.0140.00517.09
8.0.10.0070.00016.88
8.0.00.0040.01316.67
7.4.330.0000.00515.55
7.4.320.0030.00316.46
7.4.300.0030.00316.61
7.4.290.0100.00016.50
7.4.280.0000.00916.58
7.4.270.0070.00416.48
7.4.260.0050.00216.44
7.4.250.0000.00716.44
7.4.240.0000.00916.53
7.4.230.0070.00016.48
7.4.220.0030.00316.70
7.4.210.0110.00616.68
7.4.200.0030.00316.66
7.4.160.0100.00716.58
7.4.140.0110.00717.86
7.4.130.0180.00716.55
7.4.120.0090.00916.39
7.4.110.0100.00716.56
7.4.100.0090.01216.53
7.4.90.0130.01016.48
7.4.80.0110.00719.39
7.4.70.0030.01316.41
7.4.60.0060.00916.71
7.4.50.0070.00916.56
7.4.40.0090.01416.68
7.4.00.0000.01414.93
7.3.330.0050.00013.36
7.3.320.0030.00313.18
7.3.310.0000.00816.25
7.3.300.0000.00716.37
7.3.290.0040.00416.27
7.3.280.0060.01116.31
7.3.260.0080.01016.42
7.3.240.0100.00816.33
7.3.230.0080.00916.39
7.3.210.0090.01416.34
7.3.200.0060.01116.39
7.3.190.0160.00016.44
7.3.180.0100.00616.36
7.3.170.0070.01016.45
7.3.160.0090.00916.36
7.3.50.0070.00714.40
7.3.40.0150.00714.50
7.3.30.0080.01314.63
7.3.20.0130.00314.53
7.3.10.0200.00314.67
7.3.00.0080.00814.78
7.2.330.0070.01116.31
7.2.320.0060.01616.41
7.2.310.0110.00616.79
7.2.300.0070.01016.66
7.2.290.0060.01016.75
7.2.180.0100.00315.07
7.2.170.0070.01115.04
7.2.160.0140.00715.12
7.2.150.0150.00914.82
7.2.140.0110.00414.96
7.2.130.0120.00315.07
7.2.120.0100.01614.93
7.2.110.0130.01015.06
7.2.100.0070.00714.72
7.2.90.0130.01315.02
7.2.80.0070.01414.98
7.2.70.0090.00315.14
7.2.60.0140.00015.07
7.2.50.0390.01115.00
7.2.40.0080.00614.82
7.2.30.0090.00615.09
7.2.20.0120.01214.72
7.2.10.0130.00714.75
7.2.00.0030.01014.90
7.1.280.0070.00713.75
7.1.270.0170.00613.47
7.1.260.0060.00913.83
7.1.250.0160.00613.88

preferences:
36.23 ms | 403 KiB | 5 Q