3v4l.org

run code in 300+ PHP versions simultaneously
<?php // define class constant linking to a not defined constant class Foo { const FOO = FOO; } class Bar { const BAR = BAR; } echo 'Define the linked constant AFTER reading: ' . PHP_EOL; Foo::FOO; define('FOO', 'Value of FOO'); var_dump(Foo::FOO); echo '####################' . PHP_EOL; echo 'Define the linked constant BEFORE reading: ' . PHP_EOL; define('BAR', 'Value of BAR'); var_dump(Bar::BAR);

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.70.0090.00618.31
8.3.60.0090.00918.27
8.3.50.0140.00722.05
8.3.40.0090.00618.88
8.3.30.0000.01418.74
8.3.20.0050.00318.91
8.3.10.0050.00321.09
8.3.00.0040.00419.68
8.2.180.0180.00016.50
8.2.170.0090.00622.96
8.2.160.0120.00920.35
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0060.00321.03
8.2.110.0040.00422.26
8.2.100.0090.00317.91
8.2.90.0000.00819.23
8.2.80.0000.00719.37
8.2.70.0090.00317.50
8.2.60.0030.00618.04
8.2.50.0050.00418.07
8.2.40.0050.00318.16
8.2.30.0000.00721.23
8.2.20.0040.00417.75
8.2.10.0000.00717.75
8.2.00.0110.00017.72
8.1.280.0060.01125.92
8.1.270.0000.00723.99
8.1.260.0070.01026.35
8.1.250.0080.00028.09
8.1.240.0030.00622.50
8.1.230.0080.00320.96
8.1.220.0000.00818.77
8.1.210.0040.00418.88
8.1.200.0050.00517.22
8.1.190.0020.00517.51
8.1.180.0050.00418.10
8.1.170.0030.00618.55
8.1.160.0000.00718.70
8.1.150.0050.00318.49
8.1.140.0050.00317.37
8.1.130.0030.00317.68
8.1.120.0000.00717.45
8.1.110.0030.00517.28
8.1.100.0000.00817.32
8.1.90.0070.00017.32
8.1.80.0070.00017.43
8.1.70.0020.00517.41
8.1.60.0040.00717.35
8.1.50.0000.00717.48
8.1.40.0000.00717.36
8.1.30.0080.00017.47
8.1.20.0040.00417.55
8.1.10.0040.00417.56
8.1.00.0050.00317.39
8.0.300.0070.00319.82
8.0.290.0070.00017.18
8.0.280.0030.00318.45
8.0.270.0030.00317.22
8.0.260.0000.00716.89
8.0.250.0060.00317.04
8.0.240.0080.00017.05
8.0.230.0000.00716.95
8.0.220.0050.00317.02
8.0.210.0000.00716.97
8.0.200.0070.00017.01
8.0.190.0000.00816.92
8.0.180.0000.00716.89
8.0.170.0000.00816.87
8.0.160.0030.00716.94
8.0.150.0000.00716.96
8.0.140.0030.00616.94
8.0.130.0000.00513.41
8.0.120.0030.00616.85
8.0.110.0080.00016.95
8.0.100.0040.00417.02
8.0.90.0050.00316.96
8.0.80.0140.00716.92
8.0.70.0070.00016.91
8.0.60.0000.00816.99
8.0.50.0000.00716.82
8.0.30.0160.00617.20
8.0.20.0130.00817.40
8.0.10.0040.00416.89
8.0.00.0100.00716.83
7.4.330.0020.00216.71
7.4.320.0000.00616.51
7.4.300.0030.00316.50
7.4.290.0020.00516.50
7.4.280.0070.00016.52
7.4.270.0030.00316.34
7.4.260.0060.00013.22
7.4.250.0030.00516.32
7.4.240.0070.00016.53
7.4.230.0000.00716.34
7.4.220.0080.01116.35
7.4.210.0060.00916.57
7.4.200.0000.00716.59
7.4.190.0000.00716.39
7.4.160.0030.01316.45
7.4.150.0100.00717.40
7.4.140.0080.01017.86
7.4.130.0090.00916.40
7.4.120.0090.00916.61
7.4.110.0130.01216.54
7.4.100.0070.01116.38
7.4.90.0060.01116.43
7.4.80.0120.00919.39
7.4.70.0070.01016.51
7.4.60.0080.01016.60
7.4.50.0080.00016.50
7.4.40.0040.01522.77
7.4.30.0140.00316.60
7.4.00.0030.01414.89
7.3.330.0000.00513.16
7.3.320.0050.00013.25
7.3.310.0000.00616.25
7.3.300.0030.00316.15
7.3.290.0030.01116.31
7.3.280.0130.00516.34
7.3.270.0100.01017.40
7.3.260.0100.00818.24
7.3.250.0100.00716.38
7.3.240.0070.01116.55
7.3.230.0070.01016.39
7.3.210.0170.00716.40
7.3.200.0090.01519.39
7.3.190.0120.00916.49
7.3.180.0000.01516.23
7.3.170.0110.00616.48
7.3.160.0030.01416.32
7.3.120.0110.00314.91
7.2.330.0030.01516.67
7.2.320.0140.01016.41
7.2.310.0070.01016.79
7.2.300.0130.00416.75
7.2.290.0050.01116.55
7.2.60.0060.00916.99
7.2.00.0000.00919.27
7.1.200.0040.01115.61
7.1.100.0030.01017.91
7.1.70.0030.00616.73
7.1.60.0030.00716.86
7.1.50.0000.01116.86
7.1.40.0000.01016.51
7.1.30.0060.01316.55
7.1.20.0080.00316.87
7.1.10.0040.00716.43
7.1.00.0000.00816.69
7.0.200.0000.00716.79
7.0.190.0090.00616.60
7.0.180.0080.00016.21
7.0.170.0030.01316.04
7.0.160.0000.00716.15
7.0.150.0030.00716.19
7.0.140.0050.00316.14
7.0.130.0000.00716.46
7.0.120.0040.00716.62
7.0.110.0000.00816.16
7.0.100.0000.01016.21
7.0.90.0000.00716.21
7.0.80.0000.00716.21
7.0.70.0000.01116.07
7.0.60.0000.00916.09
7.0.50.0000.00816.20
7.0.40.0000.00915.56
7.0.30.0100.00315.56
7.0.20.0040.00415.56
7.0.10.0000.01115.56
7.0.00.0020.00515.56
5.6.300.0030.05220.97
5.6.290.0030.05220.96
5.6.280.0000.04621.07
5.6.270.0100.03720.88
5.6.260.0130.03620.87
5.6.250.0070.03820.98
5.6.240.0100.03320.96
5.6.230.0000.04620.98
5.6.220.0000.04420.95
5.6.210.0000.04421.07
5.6.200.0030.04120.87
5.6.190.0000.05021.03
5.6.180.0030.04321.03
5.6.170.0000.04420.84
5.6.160.0270.03320.96
5.6.150.0070.04020.84
5.6.140.0030.04220.88
5.6.130.0040.03921.02
5.6.120.0000.06020.75
5.6.110.0000.04420.86
5.6.100.0160.04620.88
5.6.90.0100.03620.80
5.6.80.0000.04620.15
5.6.70.0070.07520.23
5.6.60.0000.04520.23
5.6.50.0000.04020.23
5.6.40.0070.07320.41
5.6.30.0030.06620.21
5.6.20.0030.03820.18
5.6.10.0100.04920.35
5.6.00.0030.05320.39
5.5.380.0000.06117.55
5.5.370.0060.04117.61
5.5.360.0060.03517.57
5.5.350.0000.05017.43
5.5.340.0000.05318.13
5.5.330.0030.03817.86
5.5.320.0000.05718.13
5.5.310.0170.04318.01
5.5.300.0030.03818.06
5.5.290.0060.03617.68
5.5.280.0090.03818.09
5.5.270.0100.06818.08
5.5.260.0170.04418.05
5.5.250.0100.03817.84
5.5.240.0030.05017.09
5.5.230.0000.06217.56
5.5.220.0000.04917.55
5.5.210.0000.04117.21
5.5.200.0030.04617.06
5.5.190.0030.06017.05
5.5.180.0000.04117.41
5.5.160.0000.04117.36
5.5.150.0070.05717.21
5.5.140.0030.05517.38
5.5.130.0030.03917.44
5.5.120.0060.03517.43
5.5.110.0030.04617.38
5.5.100.0000.05017.29
5.5.90.0030.03817.32
5.5.80.0030.03917.13
5.5.70.0070.03717.28
5.5.60.0030.04517.28
5.5.50.0030.03917.37
5.5.40.0000.05417.30
5.5.30.0000.04417.29
5.5.20.0000.04117.27
5.5.10.0000.05117.30
5.5.00.0000.04517.32
5.4.450.0030.05919.41
5.4.440.0000.04419.43
5.4.430.0170.06719.54
5.4.420.0060.04119.56
5.4.410.0060.03919.13
5.4.400.0090.03419.17
5.4.390.0000.04518.95
5.4.380.0000.04019.14
5.4.370.0070.04019.22
5.4.360.0030.03819.23
5.4.350.0000.04019.14
5.4.340.0060.04818.89
5.4.320.0070.04618.94
5.4.310.0000.04019.07
5.4.300.0230.04318.98
5.4.290.0030.03818.92
5.4.280.0030.03818.98
5.4.270.0070.04719.10
5.4.260.0030.08319.11
5.4.250.0030.07518.98
5.4.240.0030.04318.88
5.4.230.0100.06419.05
5.4.220.0000.06019.08
5.4.210.0070.03418.97
5.4.200.0070.03318.91
5.4.190.0030.04019.06
5.4.180.0030.03918.91
5.4.170.0030.03719.15
5.4.160.0070.05219.05
5.4.150.0070.04318.90
5.4.140.0000.04816.59
5.4.130.0100.03616.72
5.4.120.0070.03916.78
5.4.110.0030.03816.80
5.4.100.0070.04716.69
5.4.90.0000.04316.43
5.4.80.0130.06816.52
5.4.70.0030.04116.83
5.4.60.0000.04816.42
5.4.50.0030.03616.45
5.4.40.0070.03416.80
5.4.30.0030.03616.61
5.4.20.0070.03316.72
5.4.10.0000.04216.59
5.4.00.0030.03416.10
5.3.290.0070.05415.56
5.3.280.0030.06515.56
5.3.270.0070.04315.56
5.3.260.0060.04515.56
5.3.250.0040.03615.56
5.3.240.0030.04015.56
5.3.230.0030.04015.56
5.3.220.0000.04315.56
5.3.210.0060.03215.56
5.3.200.0000.03815.56
5.3.190.0000.03815.56
5.3.180.0030.04315.56
5.3.170.0000.04415.56
5.3.160.0000.04615.56
5.3.150.0030.06715.56
5.3.140.0000.04815.56
5.3.130.0160.03615.56
5.3.120.0170.04815.56
5.3.110.0030.04815.56
5.3.100.0000.04015.56
5.3.90.0030.05315.56
5.3.80.0000.04315.56
5.3.70.0030.03815.56
5.3.60.0070.03715.56
5.3.50.0030.03415.56
5.3.40.0070.04415.56
5.3.30.0000.03715.56
5.3.20.0000.04515.56
5.3.10.0000.03615.56
5.3.00.0000.04615.56
5.2.170.0030.02915.56
5.2.160.0030.03015.56
5.2.150.0000.03115.56
5.2.140.0070.05315.56
5.2.130.0000.03015.56
5.2.120.0030.02715.56
5.2.110.0040.03315.56
5.2.100.0130.02615.56
5.2.90.0000.03715.56
5.2.80.0030.03915.56
5.2.70.0000.04615.56
5.2.60.0030.02915.56
5.2.50.0030.05615.56
5.2.40.0070.04615.56
5.2.30.0000.04015.56
5.2.20.0030.02715.56
5.2.10.0060.02615.56
5.2.00.0060.02615.56
5.1.60.0030.02315.56
5.1.50.0000.02615.56
5.1.40.0070.01815.56
5.1.30.0030.02615.56
5.1.20.0060.02215.56
5.1.10.0060.02115.56
5.1.00.0070.05515.56
5.0.50.0000.02315.56
5.0.40.0030.01815.56
5.0.30.0030.02915.56
5.0.20.0030.01715.56
5.0.10.0060.04515.56
5.0.00.0000.03315.56
4.4.90.0000.01615.56
4.4.80.0000.02415.56
4.4.70.0000.01715.56
4.4.60.0000.02015.56
4.4.50.0070.01715.56
4.4.40.0000.02515.56
4.4.30.0000.03415.56
4.4.20.0000.01915.56
4.4.10.0000.02115.56
4.4.00.0030.02615.56
4.3.110.0090.01515.56
4.3.100.0030.02715.56
4.3.90.0060.03215.56
4.3.80.0100.01915.56
4.3.70.0000.01615.56
4.3.60.0000.01615.56
4.3.50.0000.01815.56
4.3.40.0040.02615.56
4.3.30.0000.04115.56
4.3.20.0000.02815.56
4.3.10.0030.01915.56
4.3.00.0000.01915.56

preferences:
56.93 ms | 401 KiB | 5 Q