3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { const MY_CONST = false; public function my_const_self() { return self::MY_CONST; } public function my_const_static() { return static::MY_CONST; } } class B extends A { const MY_CONST = true; } $b = new B(); echo $b->my_const_self ? 'yes' : 'no'; // output: no echo $b->my_const_static ? 'yes' : 'no'; // output: yes ?>

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.0130.00618.31
8.3.50.0040.01117.99
8.3.40.0100.00318.53
8.3.30.0110.00318.80
8.3.20.0000.00820.34
8.3.10.0040.00421.73
8.3.00.0040.00420.84
8.2.180.0120.00616.75
8.2.170.0050.00822.96
8.2.160.0100.00320.23
8.2.150.0080.00024.18
8.2.140.0060.00924.66
8.2.130.0080.00026.16
8.2.120.0080.00021.12
8.2.110.0090.00022.25
8.2.100.0060.00617.66
8.2.90.0040.00419.17
8.2.80.0000.00817.97
8.2.70.0030.00717.50
8.2.60.0000.00817.68
8.2.50.0000.00818.07
8.2.40.0080.00318.28
8.2.30.0030.00618.14
8.2.20.0040.00417.69
8.2.10.0050.00217.91
8.2.00.0000.00918.07
8.1.280.0190.00325.92
8.1.270.0140.00720.21
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00923.88
8.1.230.0060.00619.16
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0040.00417.22
8.1.190.0060.00317.10
8.1.180.0050.00318.10
8.1.170.0100.00318.34
8.1.160.0000.00721.88
8.1.150.0040.00418.76
8.1.140.0000.00717.46
8.1.130.0040.00417.89
8.1.120.0000.00717.44
8.1.110.0060.00317.30
8.1.100.0040.00817.32
8.1.90.0070.00017.29
8.1.80.0030.00317.43
8.1.70.0030.00317.28
8.1.60.0000.00917.48
8.1.50.0080.00017.46
8.1.40.0050.00317.40
8.1.30.0050.00317.58
8.1.20.0000.00717.50
8.1.10.0000.00717.41
8.1.00.0000.00717.38
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0030.00318.33
8.0.270.0070.00017.27
8.0.260.0000.00817.17
8.0.250.0020.00517.07
8.0.240.0050.00317.02
8.0.230.0040.00416.83
8.0.220.0030.00316.88
8.0.210.0030.00316.94
8.0.200.0030.00316.98
8.0.190.0050.00317.02
8.0.180.0040.00416.81
8.0.170.0040.00416.96
8.0.160.0040.00416.95
8.0.150.0020.00516.84
8.0.140.0070.00016.77
8.0.130.0000.00613.23
8.0.120.0000.00716.75
8.0.110.0050.00216.97
8.0.100.0000.00716.93
8.0.90.0070.00016.92
8.0.80.0100.01016.94
8.0.70.0070.00016.91
8.0.60.0030.00616.89
8.0.50.0000.00816.94
8.0.30.0090.01216.99
8.0.20.0130.00917.40
8.0.10.0030.00316.97
8.0.00.0070.01016.84
7.4.330.0050.00015.03
7.4.320.0030.00316.58
7.4.300.0030.00316.37
7.4.290.0000.00816.35
7.4.280.0030.00516.45
7.4.270.0070.00016.42
7.4.260.0070.00016.49
7.4.250.0000.00716.38
7.4.240.0020.00516.51
7.4.230.0020.00516.26
7.4.220.0070.02116.55
7.4.210.0090.00616.59
7.4.200.0030.00316.51
7.4.160.0080.00816.39
7.4.150.0100.00717.40
7.4.140.0090.00917.86
7.4.130.0140.00716.44
7.4.120.0160.00516.45
7.4.110.0130.01016.66
7.4.100.0090.01516.51
7.4.90.0130.00416.38
7.4.80.0060.01219.39
7.4.70.0070.01016.60
7.4.60.0100.00616.60
7.4.50.0000.00716.42
7.4.40.0100.01016.60
7.4.30.0030.01716.45
7.4.00.0060.01014.71
7.3.330.0030.00313.17
7.3.320.0000.00513.07
7.3.310.0080.00016.27
7.3.300.0000.00616.26
7.3.290.0000.00616.25
7.3.280.0090.00816.21
7.3.270.0140.01117.40
7.3.260.0090.00916.24
7.3.250.0140.01216.38
7.3.240.0100.01316.24
7.3.230.0160.00316.39
7.3.210.0100.00616.52
7.3.200.0120.00619.39
7.3.190.0080.00816.12
7.3.180.0090.01216.32
7.3.170.0100.01316.53
7.3.160.0090.00816.16
7.3.10.0120.00016.34
7.3.00.0040.00416.50
7.2.330.0090.01016.60
7.2.320.0060.01016.36
7.2.310.0100.00716.71
7.2.300.0060.01516.38
7.2.290.0070.01516.65
7.2.130.0030.00617.02
7.2.120.0080.00416.63
7.2.110.0060.00316.84
7.2.100.0090.00316.92
7.2.90.0130.00316.81
7.2.80.0000.01216.96
7.2.70.0030.00616.64
7.2.60.0140.00716.65
7.2.50.0070.00316.94
7.2.40.0110.00317.05
7.2.30.0040.00716.74
7.2.20.0000.01316.64
7.2.10.0060.00616.81
7.2.00.0060.00918.02
7.1.250.0000.00915.67
7.1.100.0090.01318.14
7.1.70.0040.00417.15
7.1.60.0100.01319.48
7.1.50.0260.01034.59
7.1.00.0100.07022.48
7.0.200.0000.00816.44
7.0.60.0070.08019.89
7.0.50.0170.06317.87
7.0.40.0070.04320.10
7.0.30.0330.07020.06
7.0.20.0270.06720.07
7.0.10.0070.04720.19
7.0.00.0070.04020.22
5.6.280.0000.07321.10
5.6.210.0100.07720.61
5.6.200.0130.05718.22
5.6.190.0070.04020.57
5.6.180.0270.05720.46
5.6.170.0130.05020.47
5.6.160.0100.06720.52
5.6.150.0030.04018.17
5.6.140.0100.05018.18
5.6.130.0100.08318.14
5.6.120.0070.04320.97
5.6.110.0000.09321.13
5.6.100.0100.08021.01
5.6.90.0030.09321.08
5.6.80.0070.06720.41
5.5.350.0100.07320.30
5.5.340.0070.08317.95
5.5.330.0100.09020.27
5.5.320.0000.06720.27
5.5.310.0330.07720.28
5.5.300.0070.08017.92
5.5.290.0070.08018.04
5.5.280.0130.06720.94
5.5.270.0070.07320.75
5.5.260.0100.06720.76
5.5.250.0070.03720.47
5.5.240.0100.07320.07
5.4.450.2700.03719.46
5.4.440.2470.03319.49
5.4.430.2470.03019.43
5.4.420.2470.03719.40
5.4.410.2630.04719.14
5.4.400.2830.03319.22
5.4.390.2730.03319.17
5.4.380.2700.03718.88
5.4.370.2730.03319.20
5.4.360.2570.04018.87
5.4.350.2700.04019.09
5.4.340.2730.04019.09
5.4.320.2430.03719.06
5.4.310.2770.04719.22
5.4.300.2370.04318.96
5.4.290.2670.04019.22
5.4.280.2830.04019.14
5.4.270.2400.03718.85
5.4.260.2800.03718.98
5.4.250.2900.03019.16
5.4.240.2570.03719.14
5.4.230.2830.03719.30
5.4.220.2570.03019.30
5.4.210.2570.03319.22
5.4.200.2600.03719.00
5.4.190.2630.03319.12
5.4.180.2570.03719.21
5.4.170.2600.03319.23
5.4.160.2600.03318.85
5.4.150.2530.04019.13
5.4.140.2570.03016.54
5.4.130.1230.03316.33
5.4.120.0000.04016.39
5.4.110.0070.04016.50
5.4.100.0630.03716.61
5.4.90.2700.03316.50
5.4.80.2500.03716.44
5.4.70.2530.03316.59
5.4.60.2630.04016.49
5.4.50.2670.03716.43
5.4.40.2830.04316.50
5.4.30.2400.04016.53
5.4.20.2770.03716.52
5.4.10.2130.03716.51
5.4.00.2300.03716.09
5.3.290.2270.03714.75
5.3.280.2570.03014.69
5.3.270.2500.03314.63
5.3.260.2270.04014.58
5.3.250.2170.04014.51
5.3.240.2400.03314.50
5.3.230.2430.03014.51
5.3.220.1870.04714.65
5.3.210.2700.03714.62
5.3.200.2470.03714.65
5.3.190.2970.04714.56
5.3.180.2700.04014.64
5.3.170.2930.03314.58
5.3.160.2600.03714.65
5.3.150.2500.03314.48
5.3.140.3030.04014.58
5.3.130.2900.03714.70
5.3.120.2730.03714.45
5.3.110.2630.04314.66
5.3.100.2670.04314.06
5.3.90.2930.04714.14
5.3.80.2630.03014.11
5.3.70.2400.04014.25
5.3.60.2500.03314.02
5.3.50.2130.03014.18
5.3.40.0070.04014.18
5.3.30.0030.03313.93
5.3.20.1730.03713.60
5.3.10.2700.04313.59
5.3.00.2730.04013.55
5.2.170.2130.03011.22
5.2.160.2330.03011.29
5.2.150.2500.03311.05
5.2.140.2430.03711.04
5.2.130.2270.02011.33
5.2.120.2030.03311.02
5.2.110.0530.03711.02
5.2.100.0070.03311.02
5.2.90.0130.02311.34
5.2.80.0900.03011.01
5.2.70.2270.03011.00
5.2.60.2130.03311.14
5.2.50.2230.02711.02
5.2.40.1700.02711.11
5.2.30.1670.03311.05
5.2.20.1700.03011.02
5.2.10.1730.03310.89
5.2.00.1730.02310.63
5.1.60.2000.0279.98
5.1.50.1630.02710.08
5.1.40.1370.02010.06
5.1.30.0070.02010.46
5.1.20.0070.02010.33
5.1.10.0000.02710.15
5.1.00.0000.04310.15
5.0.50.0430.0208.48
5.0.40.0900.0208.30
5.0.30.0930.0278.11
5.0.20.0930.0178.10
5.0.10.0970.0208.18
5.0.00.0770.0338.06
4.4.90.1000.0208.06
4.4.80.0870.0138.06
4.4.70.0970.0178.06
4.4.60.0870.0138.06
4.4.50.1030.0178.06
4.4.40.0900.0338.06
4.4.30.1000.0238.06
4.4.20.1000.0238.06
4.4.10.0900.0138.06
4.4.00.0970.0278.06
4.3.110.0970.0178.06
4.3.100.1100.0138.06
4.3.90.1070.0178.06
4.3.80.0800.0278.06
4.3.70.0830.0138.06
4.3.60.1000.0208.06
4.3.50.1070.0208.06
4.3.40.0830.0238.06
4.3.30.0600.0178.06
4.3.20.0470.0238.06
4.3.10.0470.0208.06
4.3.00.0570.0308.06

preferences:
67.48 ms | 400 KiB | 5 Q