3v4l.org

run code in 300+ PHP versions simultaneously
<?php class t { const A = 1; function __construct() { $r = new ReflectionClass($this); var_dump($r->hasConstant('A')); var_dump($r->hasConstant('c')); var_dump($r->hasConstant('A'), self::A); } protected function getA() { return self::A; } } class s extends t { const A = 2; function __construct() { $r = new ReflectionClass($this); var_dump($r->hasConstant('A'), self::A, $this->getA()); } } $t = new t; $s = new s;

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.00618.43
8.3.50.0060.01421.92
8.3.40.0120.00918.75
8.3.30.0120.00318.59
8.3.20.0080.00018.35
8.3.10.0080.00020.85
8.3.00.0080.00023.84
8.2.180.0120.00618.54
8.2.170.0130.00722.96
8.2.160.0150.00020.46
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0070.00720.95
8.2.110.0000.00920.33
8.2.100.0060.00617.78
8.2.90.0040.00419.02
8.2.80.0080.00017.97
8.2.70.0040.00417.46
8.2.60.0000.00817.91
8.2.50.0000.00818.07
8.2.40.0000.00718.09
8.2.30.0030.00621.28
8.2.20.0040.00417.58
8.2.10.0000.00817.67
8.2.00.0000.00917.62
8.1.280.0030.01725.92
8.1.270.0080.00023.99
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0030.00622.61
8.1.230.0040.00720.96
8.1.220.0060.00318.77
8.1.210.0000.00818.78
8.1.200.0060.00317.23
8.1.190.0050.00217.28
8.1.180.0000.00818.10
8.1.170.0080.00018.59
8.1.160.0030.00518.82
8.1.150.0000.00718.59
8.1.140.0000.00717.39
8.1.130.0000.00717.42
8.1.120.0040.00417.46
8.1.110.0020.00517.31
8.1.100.0000.00717.29
8.1.90.0040.00417.44
8.1.80.0000.00717.41
8.1.70.0040.00417.27
8.1.60.0030.00617.57
8.1.50.0000.00817.51
8.1.40.0040.00417.41
8.1.30.0030.00517.66
8.1.20.0040.00417.50
8.1.10.0040.00417.54
8.1.00.0090.00317.44
8.0.300.0050.00319.84
8.0.290.0070.00017.05
8.0.280.0000.00718.45
8.0.270.0030.00317.25
8.0.260.0030.00316.61
8.0.250.0000.00716.94
8.0.240.0060.00316.91
8.0.230.0000.00716.89
8.0.220.0000.00816.82
8.0.210.0030.00316.74
8.0.200.0000.00716.86
8.0.190.0040.00416.95
8.0.180.0040.00416.91
8.0.170.0040.00416.83
8.0.160.0070.00016.73
8.0.150.0030.00516.76
8.0.140.0040.00716.84
8.0.130.0030.00313.26
8.0.120.0030.00616.74
8.0.110.0090.00016.85
8.0.100.0000.00716.89
8.0.90.0000.00816.89
8.0.80.0090.00616.89
8.0.70.0070.00016.64
8.0.60.0040.00416.77
8.0.50.0050.00316.73
8.0.30.0090.01116.99
8.0.20.0090.01317.40
8.0.10.0040.00416.78
8.0.00.0100.00816.71
7.4.330.0000.00516.81
7.4.320.0030.00316.55
7.4.300.0000.00616.51
7.4.290.0000.00816.48
7.4.280.0070.00016.49
7.4.270.0030.00316.53
7.4.260.0030.00313.26
7.4.250.0090.00016.47
7.4.240.0050.00316.60
7.4.230.0000.00716.32
7.4.220.0090.00916.46
7.4.210.0100.00416.64
7.4.200.0070.00016.48
7.4.190.0040.00316.73
7.4.160.0110.00616.45
7.4.150.0100.00717.40
7.4.140.0100.01017.86
7.4.130.0120.00616.53
7.4.120.0080.01116.37
7.4.110.0080.00816.64
7.4.100.0090.01016.51
7.4.90.0080.01116.39
7.4.80.0100.01319.39
7.4.70.0130.00816.43
7.4.60.0090.00616.51
7.4.50.0080.00016.41
7.4.40.0090.00522.77
7.4.30.0030.01716.66
7.4.00.0080.00614.94
7.3.330.0020.00213.26
7.3.320.0050.00013.11
7.3.310.0050.00216.23
7.3.300.0000.00716.22
7.3.290.0060.00916.24
7.3.280.0140.00616.24
7.3.270.0060.01617.40
7.3.260.0100.01018.24
7.3.250.0090.01116.38
7.3.240.0060.01116.41
7.3.230.0120.00616.39
7.3.210.0150.00416.38
7.3.200.0100.00719.39
7.3.190.0070.01516.38
7.3.180.0040.01116.23
7.3.170.0030.01316.29
7.3.160.0000.01516.32
7.3.120.0070.00714.59
7.3.10.0050.01016.34
7.3.00.0080.00816.40
7.2.330.0070.01016.45
7.2.320.0140.00916.57
7.2.310.0090.00916.70
7.2.300.0060.00916.63
7.2.290.0070.01016.73
7.2.130.0050.01116.61
7.2.120.0090.00416.48
7.2.110.0060.00716.59
7.2.100.0130.00316.55
7.2.90.0090.00716.55
7.2.80.0150.00416.71
7.2.70.0050.01016.91
7.2.60.0070.00916.70
7.2.50.0190.00716.75
7.2.40.0120.01516.63
7.2.30.0160.00916.70
7.2.20.0180.00616.68
7.2.10.0190.00916.66
7.2.00.0100.00917.60
7.1.250.0130.00415.67
7.1.100.0030.00918.03
7.1.70.0000.00817.13
7.1.60.0030.00716.88
7.1.50.0040.01817.07
7.1.00.0030.07022.36
7.0.200.0110.00816.80
7.0.140.0000.07722.09
7.0.60.0100.06719.82
7.0.50.0070.08317.89
7.0.40.0000.05720.27
7.0.30.0330.04020.10
7.0.20.0400.07020.07
7.0.10.0230.07020.10
7.0.00.0100.03720.09
5.6.280.0030.07320.93
5.6.210.0100.04320.66
5.6.200.0070.03718.20
5.6.190.0070.08320.47
5.6.180.0330.04720.64
5.6.170.0130.04020.39
5.6.160.0070.06320.57
5.6.150.0030.03718.27
5.6.140.0030.05318.21
5.6.130.0070.03718.27
5.6.120.0130.06320.99
5.6.110.0170.07720.99
5.6.100.0130.04020.89
5.6.90.0130.03721.13
5.6.80.0130.05020.54
5.5.350.0270.07320.40
5.5.340.0070.08317.97
5.5.330.0100.04020.41
5.5.320.0100.04020.24
5.5.310.0200.04320.19
5.5.300.0030.08318.07
5.5.290.0000.04317.92
5.5.280.0030.08720.98
5.5.270.0030.08320.75
5.5.260.0100.06020.68
5.5.250.0230.07020.80
5.5.240.0170.08320.14
5.4.450.3130.03019.45
5.4.440.0030.06019.25
5.4.430.1800.04719.42
5.4.420.3870.04319.44
5.4.410.4270.03319.43
5.4.400.4030.03719.22
5.4.390.3470.03319.25
5.4.380.4170.03719.13
5.4.370.3770.04019.25
5.4.360.3130.04319.04
5.4.350.4100.04018.91
5.4.340.4230.04719.18
5.4.320.3900.03719.19
5.4.310.3930.03718.95
5.4.300.4100.03019.10
5.4.290.3570.04019.21
5.4.280.3730.03319.25
5.4.270.4270.03719.03
5.4.260.3230.03319.18
5.4.250.3800.03718.95
5.4.240.3770.03018.96
5.4.230.3400.04019.21
5.4.220.3800.04319.12
5.4.210.0100.08019.15
5.4.200.0070.07319.21
5.4.190.4700.04019.05
5.4.180.4130.03719.23
5.4.170.3630.04018.89
5.4.160.3970.04019.16
5.4.150.4070.03719.10
5.4.140.3900.03316.43
5.4.130.3900.04016.49
5.4.120.3300.03716.53
5.4.110.0130.07016.50
5.4.100.3500.03016.55
5.4.90.4070.02716.69
5.4.80.3870.03716.54
5.4.70.3370.02716.67
5.4.60.4400.03716.54
5.4.50.4530.03316.49
5.4.40.3230.03016.32
5.4.30.3130.03316.41
5.4.20.3730.03716.60
5.4.10.3230.02716.45
5.4.00.3400.03015.79
5.3.290.4000.03714.72
5.3.280.3770.03314.60
5.3.270.3930.03314.76
5.3.260.3900.03714.63
5.3.250.3900.03714.64
5.3.240.4800.04014.62
5.3.230.4170.03714.61
5.3.220.2030.03714.49
5.3.210.0100.07714.63
5.3.200.0000.05014.58
5.3.190.4170.03714.73
5.3.180.3870.04014.48
5.3.170.3730.04014.58
5.3.160.4830.03314.71
5.3.150.4000.03714.46
5.3.140.4800.03314.57
5.3.130.3700.03714.61
5.3.120.3630.03714.59
5.3.110.3700.03714.56
5.3.100.2870.04314.05
5.3.90.3300.02713.91
5.3.80.2630.03714.18
5.3.70.3130.04014.07
5.3.60.2770.03714.17
5.3.50.2700.03313.92
5.3.40.3630.03314.02
5.3.30.3930.03313.92
5.3.20.3870.04013.70
5.3.10.4200.04013.73
5.3.00.3730.04013.79
5.2.170.2970.02711.19
5.2.160.3030.03011.12
5.2.150.2600.02711.16
5.2.140.3430.03011.11
5.2.130.3330.02711.00
5.2.120.3430.03011.00
5.2.110.3330.03711.00
5.2.100.3570.02311.07
5.2.90.3330.02711.12
5.2.80.3200.03311.05
5.2.70.3430.03311.00
5.2.60.3270.02711.02
5.2.50.3500.03010.99
5.2.40.2630.03011.04
5.2.30.2630.02711.02
5.2.20.2830.02311.02
5.2.10.2630.02710.91
5.2.00.3230.03010.75
5.1.60.3430.02010.16
5.1.50.3330.02710.16
5.1.40.3400.02710.01
5.1.30.3230.03010.34
5.1.20.3030.03010.44
5.1.10.3070.03010.07
5.1.00.2970.02710.05
5.0.50.1930.0208.60
5.0.40.1670.0208.38
5.0.30.1870.0308.25
5.0.20.1800.0178.16
5.0.10.1430.0238.16
5.0.00.1230.0338.15
4.4.90.1270.0176.46
4.4.80.1670.0206.46
4.4.70.1530.0176.46
4.4.60.0800.0136.46
4.4.50.1400.0176.46
4.4.40.1870.0306.46
4.4.30.1370.0106.46
4.4.20.1470.0206.46
4.4.10.1900.0136.46
4.4.00.1900.0236.46
4.3.110.1970.0106.46
4.3.100.1670.0176.46
4.3.90.1700.0206.46
4.3.80.1530.0306.46
4.3.70.1270.0176.46
4.3.60.1230.0136.46
4.3.50.1270.0176.46
4.3.40.1630.0176.46
4.3.30.0870.0236.46
4.3.20.0930.0176.46
4.3.10.0830.0206.46
4.3.00.0800.0176.46

preferences:
44.22 ms | 400 KiB | 5 Q