3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private const C1 = "a"; private const C2 = 'b'; } try { var_dump(constant('Foo::C1')); } catch(Error $e) { echo 'Caught',$e->getMessage(), PHP_EOL; } try{ Foo::C2; } catch(Error $e) { echo 'Caught',$e->getMessage() ,PHP_EOL; }

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.1.130.0030.00317.51
8.1.120.0040.00417.36
8.1.110.0000.00817.39
8.1.100.0030.00517.51
8.1.90.0000.00717.43
8.1.80.0050.00217.48
8.1.70.0070.00017.45
8.1.60.0000.00817.58
8.1.50.0000.00817.54
8.1.40.0030.00617.48
8.1.30.0050.00317.65
8.1.20.0040.00417.68
8.1.10.0040.00417.47
8.1.00.0060.00317.42
8.0.260.0000.00616.78
8.0.250.0000.00717.02
8.0.240.0000.00617.05
8.0.230.0060.00316.97
8.0.220.0030.00316.99
8.0.210.0000.00616.82
8.0.200.0040.00417.00
8.0.190.0030.00616.91
8.0.180.0040.00416.96
8.0.170.0030.00516.97
8.0.160.0000.00716.93
8.0.150.0000.00716.82
8.0.140.0000.00716.87
8.0.130.0000.00513.33
8.0.120.0040.00416.94
8.0.110.0040.00416.86
8.0.100.0000.00716.97
8.0.90.0000.00716.97
8.0.80.0070.00716.96
8.0.70.0040.00416.89
8.0.60.0000.00716.99
8.0.50.0040.00416.74
8.0.30.0040.01317.03
8.0.20.0090.01017.40
8.0.10.0040.00417.14
8.0.00.0100.00717.05
7.4.330.0030.00315.14
7.4.320.0030.00316.57
7.4.300.0000.00616.47
7.4.290.0070.00016.35
7.4.280.0040.00416.53
7.4.270.0000.00616.41
7.4.260.0000.00816.47
7.4.250.0030.00316.47
7.4.240.0030.00316.52
7.4.230.0070.00016.34
7.4.220.0060.01916.53
7.4.210.0080.00516.50
7.4.200.0040.00416.33
7.4.160.0100.00616.55
7.4.150.0130.00617.40
7.4.140.0150.00517.86
7.4.130.0150.00816.50
7.4.120.0120.00616.60
7.4.110.0140.00316.46
7.4.100.0100.00716.57
7.4.90.0110.00616.51
7.4.80.0070.01019.39
7.4.70.0110.00716.65
7.4.60.0100.01016.52
7.4.50.0100.00316.45
7.4.40.0120.00416.16
7.4.30.0040.01216.31
7.3.330.0000.00713.07
7.3.320.0000.00613.31
7.3.310.0040.00416.27
7.3.300.0030.00316.16
7.3.290.0050.00216.30
7.3.280.0070.01016.28
7.3.270.0150.00317.40
7.3.260.0100.01116.44
7.3.250.0090.00816.43
7.3.240.0100.01016.29
7.3.230.0030.01316.49
7.3.210.0100.00716.43
7.3.200.0090.00616.42
7.3.190.0030.01316.23
7.3.180.0080.00816.34
7.3.170.0090.01316.54
7.3.160.0060.00916.43
7.2.330.0120.00816.72
7.2.320.0070.01616.53
7.2.310.0070.01716.50
7.2.300.0150.00816.44
7.2.290.0110.00516.72
7.1.00.0030.05722.57
7.0.100.2830.08719.96
7.0.90.1000.05719.91
7.0.80.1870.07020.01
7.0.70.0130.06319.86
7.0.60.0230.06719.94
7.0.50.0470.05320.31
7.0.40.0400.06720.33
7.0.30.1270.06020.20
7.0.20.0500.06320.28
7.0.10.0400.07020.36
7.0.00.1630.06720.36
5.6.250.0070.08020.66
5.6.240.0200.06720.82
5.6.230.0170.07320.81
5.6.220.0100.08020.68
5.6.210.0270.06720.71
5.6.200.0270.07021.10
5.6.190.0300.04721.08
5.6.180.0200.07721.06
5.6.170.0170.07321.20
5.6.160.0130.05321.08
5.6.150.0100.06021.11
5.6.140.0170.05721.06
5.6.130.0130.07721.07
5.6.120.0130.08021.10
5.6.110.0100.06721.00
5.6.100.0130.05721.12
5.6.90.0200.06720.99
5.6.80.0100.06320.49
5.6.70.0130.06720.46
5.6.60.0130.05720.47
5.6.50.0200.06320.45
5.6.40.0170.06020.41
5.6.30.0100.07320.56
5.6.20.0130.05720.42
5.6.10.0200.06320.37
5.6.00.0230.05720.43

preferences:
12.9 ms | 406 KiB | 5 Q