3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassWithMagicConstants { const A = __DIR__; const B = __FILE__; const C = __NAMESPACE__; const D = __CLASS__; const E = __LINE__; public static $a = self::A; protected static $b = self::B; private static $c = self::C; } const NS_CONST = 'test'; class ClassWithConstantsAndInheritance extends ClassWithMagicConstants { const A = 'overridden'; const H = M_PI; const J = NS_CONST; public static $h = self::H; } $refClass = new ReflectionClass('ClassWithConstantsAndInheritance'); var_dump($refClass->getStaticProperties());

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.0090.00616.38
8.3.50.0140.00822.05
8.3.40.0070.01018.71
8.3.30.0110.00418.30
8.3.20.0000.00720.16
8.3.10.0040.00423.48
8.3.00.0060.00319.26
8.2.180.0110.01116.50
8.2.170.0090.00622.96
8.2.160.0070.00720.37
8.2.150.0090.00024.18
8.2.140.0040.00424.66
8.2.130.0030.00517.50
8.2.120.0030.00626.35
8.2.110.0060.00322.14
8.2.100.0060.00617.78
8.2.90.0030.00619.08
8.2.80.0050.00317.97
8.2.70.0080.00017.50
8.2.60.0080.00017.80
8.2.50.0040.00418.07
8.2.40.0090.00019.45
8.2.30.0030.00520.68
8.2.20.0040.00417.74
8.2.10.0040.00418.11
8.2.00.0000.00718.03
8.1.280.0070.01425.92
8.1.270.0060.00322.08
8.1.260.0040.00428.09
8.1.250.0000.00728.09
8.1.240.0060.00323.96
8.1.230.0030.00819.02
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0030.00717.13
8.1.190.0000.00817.23
8.1.180.0000.00918.10
8.1.170.0040.00418.71
8.1.160.0050.00222.05
8.1.150.0000.00818.75
8.1.140.0030.00519.50
8.1.130.0000.00717.57
8.1.120.0080.00017.47
8.1.110.0070.00017.34
8.1.100.0000.00817.47
8.1.90.0040.00417.47
8.1.80.0040.00417.39
8.1.70.0040.00417.41
8.1.60.0060.00317.58
8.1.50.0040.00417.50
8.1.40.0040.00417.55
8.1.30.0030.00617.56
8.1.20.0050.00317.63
8.1.10.0040.00417.46
8.1.00.0040.00417.36
8.0.300.0050.00218.77
8.0.290.0000.00716.75
8.0.280.0080.00018.34
8.0.270.0070.00017.14
8.0.260.0060.00017.19
8.0.250.0000.00716.90
8.0.240.0000.00716.80
8.0.230.0030.00316.91
8.0.220.0070.00016.86
8.0.210.0040.00416.80
8.0.200.0000.00616.96
8.0.190.0080.00016.96
8.0.180.0040.00416.89
8.0.170.0000.00716.92
8.0.160.0040.00416.89
8.0.150.0030.00316.69
8.0.140.0040.00416.82
8.0.130.0020.00613.29
8.0.120.0000.00816.82
8.0.110.0060.00316.77
8.0.100.0040.00416.68
8.0.90.0030.00616.93
8.0.80.0100.00716.93
8.0.70.0000.00816.75
8.0.60.0000.00816.85
8.0.50.0040.00416.77
8.0.30.0100.01116.91
8.0.20.0120.01017.40
8.0.10.0000.00717.10
8.0.00.0110.00816.80
7.4.330.0040.00016.71
7.4.320.0000.00616.59
7.4.300.0030.00316.35
7.4.290.0030.00316.59
7.4.280.0040.00416.52
7.4.270.0070.00016.60
7.4.260.0050.00316.62
7.4.250.0080.00016.40
7.4.240.0000.00716.55
7.4.230.0000.00716.38
7.4.220.0110.00716.62
7.4.210.0100.00716.63
7.4.200.0050.00216.25
7.4.160.0120.00416.45
7.4.150.0230.02217.40
7.4.140.0120.01117.86
7.4.130.0080.01216.46
7.4.120.0060.01316.63
7.4.110.0060.01016.44
7.4.100.0150.00616.58
7.4.90.0070.01116.30
7.4.80.0140.00319.39
7.4.70.0030.01416.30
7.4.60.0100.00716.56
7.4.50.0090.00616.48
7.4.40.0100.00616.42
7.4.30.0220.00316.57
7.4.00.0030.01014.77
7.3.330.0000.00613.02
7.3.320.0030.00313.10
7.3.310.0070.00016.33
7.3.300.0060.00016.31
7.3.290.0090.00616.20
7.3.280.0110.00816.20
7.3.270.0130.01017.40
7.3.260.0100.00616.48
7.3.250.0050.01416.38
7.3.240.0080.00816.25
7.3.230.0110.00616.52
7.3.210.0110.00716.23
7.3.200.0110.00716.18
7.3.190.0060.00916.29
7.3.180.0060.01016.10
7.3.170.0110.00616.30
7.3.160.0160.00616.45
7.3.120.0070.01014.75
7.3.110.0040.01114.98
7.3.100.0030.01415.02
7.3.90.0040.01214.71
7.3.80.0040.01114.41
7.3.70.0070.01014.84
7.3.60.0040.01114.76
7.3.50.0060.00614.48
7.3.40.0100.00614.77
7.3.30.0120.00614.74
7.3.20.0030.00916.64
7.3.10.0060.00616.53
7.3.00.0060.00316.66
7.2.330.0100.00816.47
7.2.320.0030.01516.38
7.2.310.0030.01416.48
7.2.300.0070.01016.50
7.2.290.0060.01516.54
7.2.250.0060.01015.19
7.2.240.0080.01215.00
7.2.230.0130.00314.67
7.2.220.0040.00815.04
7.2.210.0040.01115.18
7.2.200.0030.01415.06
7.2.190.0070.00714.63
7.2.180.0100.00314.93
7.2.170.0100.00714.85
7.2.60.0030.01316.54
7.2.00.0000.00919.32
7.1.330.0040.01115.59
7.1.320.0000.01415.70
7.1.310.0040.00415.60
7.1.300.0110.00415.67
7.1.290.0070.00715.61
7.1.280.0100.00315.69
7.1.270.0000.01415.75
7.1.260.0080.00415.50
7.1.200.0130.00015.64
7.1.100.0000.01318.17
7.1.70.0040.00416.73
7.1.60.0100.01419.36
7.1.50.0070.00716.90
7.1.00.0070.07322.32
7.0.200.0030.00616.61
7.0.60.0030.06319.86
7.0.50.0100.04017.87
7.0.40.0070.04320.25
7.0.30.0170.04020.13
7.0.20.0330.07720.10
7.0.10.0070.07720.26
7.0.00.0130.07320.09
5.6.280.0000.03720.85
5.6.210.0200.05020.61
5.6.200.0100.08018.20
5.6.190.0000.05020.77
5.6.180.0570.06720.55
5.6.170.0200.04020.48
5.6.160.0030.08320.44
5.6.150.0000.07718.29
5.6.140.0030.08718.15
5.6.130.0070.08718.23
5.6.120.0130.07720.95
5.6.110.0100.07321.14
5.6.100.0070.08321.11
5.6.90.0100.05321.08
5.6.80.0000.04320.37
5.5.350.2430.03020.46
5.5.340.0070.07717.98
5.5.330.0070.05020.41
5.5.320.0000.08720.35
5.5.310.0200.04320.35
5.5.300.0030.07318.09
5.5.290.0070.04717.98
5.5.280.0130.07320.88
5.5.270.0100.03720.77
5.5.260.0170.05720.87
5.5.250.0030.04020.77
5.5.240.0300.07020.16

preferences:
49.79 ms | 401 KiB | 5 Q