3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { // whether it's abstract or not makes no difference public const TABLE = 'fallback_const_if_wanted'; public static string $table = 'fallback_var_if_wanted'; public static function demo() { echo 'self::TABLE is ', self::TABLE, "\n"; echo 'self::$table is ', self::$table, "\n"; echo 'static::TABLE is ', static::TABLE, "\n"; echo 'static::$table is ', static::$table, "\n"; } } class ChildClass extends ParentClass { public const TABLE = 'child_const'; public static string $table = 'child_var'; } ChildClass::demo();

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.4.120.0110.00922.50
8.4.110.0130.00822.71
8.4.100.0050.00617.82
8.4.90.0100.01018.79
8.4.80.0090.00717.68
8.4.70.0140.00717.74
8.4.60.0160.00218.79
8.4.50.0100.01018.80
8.4.40.0070.01317.51
8.4.30.0130.00718.72
8.4.20.0070.01019.57
8.4.10.0040.00419.59
8.3.250.0110.00718.81
8.3.240.0110.00816.75
8.3.230.0130.00616.38
8.3.220.0090.00818.81
8.3.210.0130.00616.35
8.3.200.0070.01316.53
8.3.190.0080.01017.02
8.3.180.0110.00917.14
8.3.170.0120.00319.03
8.3.160.0040.01417.16
8.3.150.0040.01517.04
8.3.140.0150.00016.60
8.3.130.0080.00016.80
8.3.120.0110.00820.57
8.3.110.0090.00020.94
8.3.100.0030.00624.06
8.3.90.0060.01026.77
8.3.80.0060.00318.43
8.3.70.0040.01116.63
8.3.60.0140.00016.53
8.3.50.0120.00618.37
8.3.40.0070.00721.89
8.3.30.0040.01121.80
8.3.20.0160.00323.71
8.3.10.0110.00723.48
8.3.00.0070.01420.70
8.2.290.0080.00420.54
8.2.280.0120.00718.32
8.2.270.0110.00717.17
8.2.260.0070.00016.62
8.2.250.0050.00316.68
8.2.240.0100.00018.77
8.2.230.0040.01222.58
8.2.220.0080.00037.54
8.2.210.0080.00026.77
8.2.200.0060.00318.16
8.2.190.0060.01016.58
8.2.180.0140.00418.18
8.2.170.0090.00918.83
8.2.160.0130.00722.96
8.2.150.0070.01320.96
8.2.140.0090.00922.21
8.2.130.0110.00722.27
8.2.120.0150.00321.00
8.2.110.0110.00720.96
8.2.100.0090.00920.58
8.2.90.0140.00720.49
8.2.80.0090.00920.95
8.2.70.0190.00020.53
8.2.60.0040.01620.25
8.2.50.0150.00320.70
8.2.40.0070.01320.38
8.2.30.0090.00920.43
8.2.20.0120.00820.47
8.2.10.0200.00020.39
8.2.00.0080.01120.41
8.1.330.0090.00921.83
8.1.320.0090.00916.00
8.1.310.0070.01118.25
8.1.300.0000.00920.26
8.1.290.0040.00430.84
8.1.280.0140.00425.92
8.1.270.0160.00323.75
8.1.260.0100.00723.95
8.1.250.0110.00323.88
8.1.240.0100.01420.34
8.1.230.0160.00020.41
8.1.220.0140.00720.70
8.1.210.0060.00920.21
8.1.200.0070.01020.59
8.1.190.0110.00820.25
8.1.180.0090.01220.22
8.1.170.0100.00720.20
8.1.160.0060.01220.20
8.1.150.0070.01020.53
8.1.140.0000.01520.14
8.1.130.0120.00420.39
8.1.120.0110.00420.34
8.1.110.0090.00620.29
8.1.100.0080.00820.07
8.1.90.0090.00620.29
8.1.80.0040.01121.58
8.1.70.0070.00720.21
8.1.60.0150.00020.25
8.1.50.0120.00320.39
8.1.40.0080.00820.46
8.1.30.0110.00420.47
8.1.20.0090.00621.71
8.1.10.0120.00320.41
8.1.00.0080.00820.39

preferences:
27.74 ms | 403 KiB | 5 Q