3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class ParentClass { const TEST_CONSTANT = null; public function __construct() { if (!defined(self::TEST_CONSTANT)) { throw new Exception("Please define TEST_CONSTANT!"); } } abstract protected function someFunction(); } class ChildClass extends ParentClass { const TEST_CONSTANT = "value"; protected function someFunction() { //some functionality here } } $x = new ChildClass();

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.0120.00318.64
8.3.50.0110.01117.95
8.3.40.0060.00918.58
8.3.30.0090.00618.70
8.3.20.0040.00420.26
8.3.10.0080.00020.67
8.3.00.0090.00018.72
8.2.180.0030.01618.18
8.2.170.0090.00622.96
8.2.160.0070.00722.17
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0070.00721.03
8.2.120.0080.00026.35
8.2.110.0070.00320.52
8.2.100.0040.00817.80
8.2.90.0030.00619.22
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0050.00318.03
8.2.50.0030.00818.09
8.2.40.0050.00720.40
8.2.30.0050.00219.40
8.2.20.0000.00717.62
8.2.10.0000.00717.96
8.2.00.0020.00518.09
8.1.280.0120.00625.92
8.1.270.0110.00724.01
8.1.260.0080.00028.09
8.1.250.0070.00028.09
8.1.240.0000.00923.80
8.1.230.0090.00317.83
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0060.00317.13
8.1.190.0000.00816.99
8.1.180.0060.00318.10
8.1.170.0030.00718.47
8.1.160.0070.00020.61
8.1.150.0030.00618.82
8.1.140.0040.00419.38
8.1.130.0040.00417.54
8.1.120.0040.00417.41
8.1.110.0000.00817.38
8.1.100.0000.00717.29
8.1.90.0040.00417.27
8.1.80.0030.00517.38
8.1.70.0060.00317.36
8.1.60.0040.00417.52
8.1.50.0080.00017.52
8.1.40.0000.00917.45
8.1.30.0030.00617.57
8.1.20.0000.00717.50
8.1.10.0000.00817.53
8.1.00.0030.00617.43
8.0.300.0080.00018.77
8.0.290.0050.00216.75
8.0.280.0070.00018.36
8.0.270.0000.00717.36
8.0.260.0030.00317.22
8.0.250.0030.00317.03
8.0.240.0040.00417.05
8.0.230.0000.00717.00
8.0.220.0030.00316.96
8.0.210.0000.00816.93
8.0.200.0000.00616.91
8.0.190.0030.00316.90
8.0.180.0050.00316.86
8.0.170.0080.00017.02
8.0.160.0070.00016.97
8.0.150.0000.00816.98
8.0.140.0040.00416.80
8.0.130.0060.00313.41
8.0.120.0030.00616.90
8.0.110.0040.00416.84
8.0.100.0000.00816.82
8.0.90.0070.00016.96
8.0.80.0040.01116.88
8.0.70.0040.00416.79
8.0.60.0040.00417.02
8.0.50.0030.00516.96
8.0.30.0060.01016.95
8.0.20.0110.00917.40
8.0.10.0000.00716.91
8.0.00.0070.01116.81
7.4.330.0000.00516.71
7.4.320.0030.00316.36
7.4.300.0000.00716.58
7.4.290.0030.00316.54
7.4.280.0050.00316.42
7.4.270.0070.00016.52
7.4.260.0080.00216.46
7.4.250.0000.00716.33
7.4.240.0040.00316.45
7.4.230.0000.00716.43
7.4.220.0120.00616.58
7.4.210.0070.00816.63
7.4.200.0040.00416.48
7.4.160.0070.01416.37
7.4.150.0090.00917.40
7.4.140.0120.00917.86
7.4.130.0090.00916.61
7.4.120.0060.01016.60
7.4.110.0030.01316.53
7.4.100.0090.01216.48
7.4.90.0130.00416.58
7.4.80.0140.00719.39
7.4.70.0080.00916.69
7.4.60.0090.01216.32
7.4.50.0080.00616.38
7.4.40.0100.00716.64
7.4.30.0120.00616.36
7.4.00.0070.00515.01
7.3.330.0000.00513.36
7.3.320.0030.00313.19
7.3.310.0040.00416.41
7.3.300.0030.00316.36
7.3.290.0030.00316.16
7.3.280.0110.01016.33
7.3.270.0060.01217.40
7.3.260.0070.01016.65
7.3.250.0090.01316.43
7.3.240.0120.00416.32
7.3.230.0160.00016.39
7.3.210.0090.00616.34
7.3.200.0030.01716.42
7.3.190.0070.00816.42
7.3.180.0150.00416.34
7.3.170.0120.00316.57
7.3.160.0120.01116.46
7.3.120.0040.01514.81
7.3.110.0100.00314.84
7.3.100.0060.01214.71
7.3.90.0030.01014.63
7.3.80.0030.01314.65
7.3.70.0030.00714.78
7.3.60.0080.00514.91
7.3.50.0000.01114.79
7.3.40.0040.01114.59
7.3.30.0120.00314.83
7.3.20.0040.01216.71
7.3.10.0040.00716.46
7.3.00.0060.00916.18
7.2.330.0100.00716.28
7.2.320.0060.01516.35
7.2.310.0130.00616.22
7.2.300.0090.01216.38
7.2.290.0110.01116.46
7.2.250.0070.01115.01
7.2.240.0090.00914.69
7.2.230.0040.01114.67
7.2.220.0090.00614.82
7.2.210.0040.00715.14
7.2.200.0060.00915.14
7.2.190.0040.01114.91
7.2.180.0110.00414.95
7.2.170.0050.00514.94
7.2.160.0070.00714.84
7.2.150.0060.00616.91
7.2.140.0040.01416.82
7.2.130.0110.00416.68
7.2.120.0000.01016.70
7.2.110.0090.00316.39
7.2.100.0030.01316.74
7.2.90.0000.01016.55
7.2.80.0000.01416.50
7.2.70.0040.01116.96
7.2.60.0070.01016.53
7.2.50.0070.01116.75
7.2.40.0030.00916.73
7.2.30.0090.00616.70
7.2.20.0030.00916.55
7.2.10.0030.00916.61
7.2.00.0060.00918.10
7.1.330.0040.01215.60
7.1.320.0120.00315.49
7.1.310.0030.00715.42
7.1.300.0110.00415.29
7.1.290.0070.00715.54
7.1.280.0100.00315.66
7.1.270.0060.00615.86
7.1.260.0060.00915.72
7.1.250.0070.00715.58
7.1.240.0040.00415.66
7.1.230.0080.00815.73
7.1.220.0000.01515.39
7.1.210.0060.01215.44
7.1.200.0060.00515.50
7.1.190.0070.00715.45
7.1.180.0070.00715.78
7.1.170.0030.01015.72
7.1.160.0040.00715.85
7.1.150.0140.00315.72
7.1.140.0090.00915.65
7.1.130.0060.00615.68
7.1.120.0070.00315.68
7.1.110.0060.00315.63
7.1.100.0070.00716.75
7.1.90.0090.00615.45
7.1.80.0070.00715.65
7.1.70.0070.00516.19
7.1.60.0050.01217.38
7.1.50.0050.00716.22
7.1.40.0070.00415.71
7.1.30.0000.01315.64
7.1.20.0030.01015.23
7.1.10.0060.00315.84
7.1.00.0030.04119.06
7.0.330.0130.00015.37
7.0.320.0040.01114.94
7.0.310.0040.01115.12
7.0.300.0070.00715.44
7.0.290.0030.01115.34
7.0.280.0040.00715.56
7.0.270.0050.00515.36
7.0.260.0060.00615.52
7.0.250.0070.00715.58
7.0.240.0040.00715.24
7.0.230.0060.00315.37
7.0.220.0070.01015.58
7.0.210.0120.00315.42
7.0.200.0300.00715.07
7.0.190.0070.00415.36
7.0.180.0090.00015.13
7.0.170.0040.00815.27
7.0.160.0030.00615.31
7.0.150.0000.01215.45
7.0.140.0060.00615.35
7.0.130.0100.00315.20
7.0.120.0120.00315.54
7.0.110.0110.00415.43
7.0.100.0090.00015.30
7.0.90.0030.01315.48
7.0.80.0030.00615.06
7.0.70.0120.00315.62
7.0.60.0050.03017.63
7.0.50.0020.02516.55
7.0.40.0100.02116.65
7.0.30.0050.02616.60
7.0.20.0080.02516.86
7.0.10.0120.03316.66
7.0.00.0030.02816.80
5.6.400.0030.01314.12
5.6.390.0070.00714.23
5.6.380.0030.01514.01
5.6.370.0060.00613.77
5.6.360.0040.01114.04
5.6.350.0060.00914.42
5.6.340.0040.00814.10
5.6.330.0030.00614.41
5.6.320.0030.00914.29
5.6.310.0000.00813.91
5.6.300.0040.00414.46
5.6.290.0030.01014.21
5.6.280.0030.02317.45
5.6.270.0000.01614.30
5.6.260.0100.00314.14
5.6.250.0060.01214.60
5.6.240.0000.01314.19
5.6.230.0110.00414.34
5.6.220.0030.01314.33
5.6.210.0050.02617.36
5.6.200.0110.04216.06
5.6.190.0130.03817.24
5.6.180.0180.02317.39
5.6.170.0090.02717.44
5.6.160.0050.04317.27
5.6.150.0020.04816.25
5.6.140.0010.02516.26
5.6.130.0070.04316.19
5.6.120.0090.04517.48
5.6.110.0050.03117.64
5.6.100.0090.04217.56
5.6.90.0050.04717.48
5.6.80.0070.03817.24
5.6.70.0070.00714.35
5.6.60.0090.00314.21
5.6.50.0060.00614.29
5.6.40.0060.00613.99
5.6.30.0100.00314.18
5.6.20.0080.00414.29
5.6.10.0090.00914.09
5.6.00.0060.01214.19
5.5.380.0090.00614.45
5.5.370.0100.00314.46
5.5.360.0030.01014.29
5.5.350.0230.03717.13
5.5.340.0090.02116.06
5.5.330.0070.04317.40
5.5.320.0370.03217.32
5.5.310.0180.02017.22
5.5.300.0090.04215.93
5.5.290.0050.03916.18
5.5.280.0050.02217.42
5.5.270.0040.02717.31
5.5.260.0050.04717.42
5.5.250.0080.04717.40
5.5.240.0030.04317.08
5.5.230.0070.00713.91
5.5.220.0030.00913.85
5.5.210.0090.00314.16
5.5.200.0130.00014.05
5.5.190.0060.00813.98
5.5.180.0000.01513.81
5.5.170.0040.01113.77
5.5.160.0000.01514.14
5.5.150.0060.00614.16
5.5.140.0110.00414.43
5.5.130.0060.01014.06
5.5.120.0030.00713.92
5.5.110.0060.00313.66
5.5.100.0030.01014.05
5.5.90.0090.00314.04
5.5.80.0090.00614.32
5.5.70.0000.01414.18
5.5.60.0060.00913.93
5.5.50.0040.00414.07
5.5.40.0040.01113.93
5.5.30.0110.00014.13
5.5.20.0080.00313.76
5.5.10.0040.00813.80
5.5.00.0060.00314.13

preferences:
62.49 ms | 401 KiB | 5 Q