3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar\subnamespace; const FOO = 1; function foo() {} class foo { static function staticmethod() {} } namespace Foo\Bar; const FOO = 2; function foo() {} class foo { static function staticmethod() {} } /* Unqualified name */ foo(); // resolves to function Foo\Bar\foo foo::staticmethod(); // resolves to class Foo\Bar\foo, method staticmethod echo FOO,"<br />"; // resolves to constant Foo\Bar\FOO /* Qualified name */ subnamespace\foo(); // resolves to function Foo\Bar\subnamespace\foo subnamespace\foo::staticmethod(); // resolves to class Foo\Bar\subnamespace\foo, // method staticmethod echo subnamespace\FOO, "<br />"; // resolves to constant Foo\Bar\subnamespace\FOO /* Fully qualified name */ \Foo\Bar\foo(); // resolves to function Foo\Bar\foo \Foo\Bar\foo::staticmethod(); // resolves to class Foo\Bar\foo, method staticmethod echo \Foo\Bar\FOO; // resolves to constant Foo\Bar\FOO ?>

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.0130.00316.25
8.3.50.0120.00317.10
8.3.40.0100.00618.70
8.3.30.0070.00718.73
8.3.20.0040.00418.73
8.3.10.0030.00618.79
8.3.00.0060.00319.13
8.2.180.0090.00616.38
8.2.170.0070.00722.96
8.2.160.0120.00318.83
8.2.150.0050.00524.18
8.2.140.0030.00524.66
8.2.130.0070.00026.16
8.2.120.0070.00020.66
8.2.110.0030.00620.35
8.2.100.0030.00817.72
8.2.90.0050.00317.60
8.2.80.0040.00418.84
8.2.70.0000.00817.50
8.2.60.0050.00319.53
8.2.50.0040.00418.07
8.2.40.0050.00319.35
8.2.30.0090.00017.58
8.2.20.0070.00417.50
8.2.10.0040.00417.50
8.2.00.0000.00717.66
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00318.80
8.1.230.0060.00617.57
8.1.220.0000.00817.74
8.1.210.0050.00318.77
8.1.200.0040.00417.25
8.1.190.0030.00517.11
8.1.180.0000.00818.10
8.1.170.0000.00818.59
8.1.160.0040.00418.95
8.1.150.0000.00718.62
8.1.140.0070.00017.33
8.1.130.0030.00317.82
8.1.120.0030.00317.42
8.1.110.0000.00817.31
8.1.100.0040.00417.37
8.1.90.0000.00817.43
8.1.80.0030.00317.39
8.1.70.0000.00717.38
8.1.60.0000.00817.51
8.1.50.0000.00717.28
8.1.40.0000.00817.45
8.1.30.0040.00417.59
8.1.20.0050.00217.55
8.1.10.0040.00417.55
8.1.00.0090.00017.52
8.0.300.0000.00818.77
8.0.290.0040.00416.75
8.0.280.0000.00718.52
8.0.270.0030.00317.24
8.0.260.0070.00016.73
8.0.250.0000.00716.80
8.0.240.0000.00816.98
8.0.230.0000.00816.98
8.0.220.0070.00016.86
8.0.210.0070.00016.89
8.0.200.0030.00516.97
8.0.190.0040.00417.00
8.0.180.0000.00716.75
8.0.170.0060.00316.84
8.0.160.0000.00816.82
8.0.150.0000.00916.80
8.0.140.0040.00416.84
8.0.130.0000.00513.21
8.0.120.0070.00516.76
8.0.110.0030.00516.83
8.0.100.0040.00416.88
8.0.90.0040.00416.89
8.0.80.0060.01016.78
8.0.70.0000.00716.84
8.0.60.0000.00816.69
8.0.50.0000.00716.65
8.0.30.0120.00816.76
8.0.20.0100.01017.06
8.0.10.0000.00716.88
8.0.00.0120.01316.65
7.4.330.0000.00513.06
7.4.320.0070.00016.53
7.4.300.0060.00016.39
7.4.290.0000.00716.46
7.4.280.0050.00316.55
7.4.270.0060.00316.53
7.4.260.0030.00313.24
7.4.250.0030.00516.44
7.4.240.0030.00316.49
7.4.230.0070.00016.36
7.4.220.0040.01416.40
7.4.210.0060.00916.60
7.4.200.0040.00416.32
7.4.190.0000.00716.64
7.4.160.0120.00416.52
7.4.150.0220.00316.66
7.4.140.0070.01416.56
7.4.130.0130.01016.46
7.4.120.0060.01216.40
7.4.110.0070.01116.41
7.4.100.0090.00916.43
7.4.90.0080.01516.41
7.4.80.0090.00919.39
7.4.70.0060.01016.29
7.4.60.0000.01616.35
7.4.50.0060.00616.46
7.4.40.0060.01016.53
7.4.30.0070.01116.51
7.4.00.0090.00915.08
7.3.330.0000.00613.14
7.3.320.0000.00613.28
7.3.310.0070.00016.21
7.3.300.0030.00316.31
7.3.290.0070.00916.29
7.3.280.0110.00716.35
7.3.270.0000.01616.33
7.3.260.0000.01816.59
7.3.250.0090.01016.59
7.3.240.0070.01116.36
7.3.230.0060.01216.39
7.3.210.0120.00916.64
7.3.200.0100.00616.29
7.3.190.0060.01016.26
7.3.180.0160.00016.19
7.3.170.0100.00716.33
7.3.160.0150.00316.65
7.3.120.0000.01115.09
7.3.110.0070.01014.77
7.3.100.0080.00314.77
7.3.90.0040.01114.70
7.3.80.0070.00714.55
7.3.70.0030.01014.88
7.3.60.0030.00914.74
7.3.50.0060.00614.84
7.3.40.0080.00814.83
7.3.30.0030.00714.94
7.3.20.0030.00616.80
7.3.10.0100.00516.71
7.3.00.0120.00316.67
7.2.330.0130.00616.70
7.2.320.0070.01116.55
7.2.310.0110.00716.70
7.2.300.0070.01516.34
7.2.290.0090.01216.49
7.2.240.0040.01515.23
7.2.230.0110.00314.97
7.2.220.0060.00914.77
7.2.210.0000.01214.73
7.2.200.0060.00615.18
7.2.190.0060.00314.85
7.2.180.0030.01014.89
7.2.170.0030.00614.73
7.2.160.0080.00615.27
7.2.150.0040.00816.54
7.2.140.0030.01016.86
7.2.130.0060.01016.73
7.2.120.0040.00816.88
7.2.110.0100.00517.01
7.2.100.0060.00816.63
7.2.90.0100.00516.95
7.2.80.0050.00816.93
7.2.70.0040.00916.82
7.2.60.0050.00816.99
7.2.50.0060.00816.82
7.2.40.0050.00716.88
7.2.30.0040.00916.84
7.2.20.0130.00816.86
7.2.10.0100.00416.85
7.2.00.0040.00717.53
7.1.330.0100.00015.64
7.1.320.0070.00715.87
7.1.310.0120.00315.66
7.1.300.0030.01015.75
7.1.290.0060.00615.52
7.1.280.0110.00015.71
7.1.270.0030.01315.74
7.1.260.0100.00315.75
7.1.250.0060.00715.74
7.1.200.0070.00715.34
7.1.100.0000.01118.16
7.1.70.0070.00017.07
7.1.60.0030.01017.16
7.1.50.0110.00716.73
7.1.00.0070.07722.48
7.0.200.0000.01616.57
7.0.140.0030.07322.00
7.0.120.0030.07022.15
7.0.60.0030.04019.87
7.0.50.0000.04317.86
7.0.40.0100.07720.30
7.0.30.0300.08320.11
7.0.20.0270.04020.33
7.0.10.0300.07720.16
7.0.00.0000.09320.06
5.6.280.0030.07321.12
5.6.210.0070.07020.47
5.6.200.0100.06718.15
5.6.190.0070.08720.58
5.6.180.0270.06320.30
5.6.170.0470.06720.57
5.6.160.0170.07020.46
5.6.150.0030.06018.12
5.6.140.0100.07718.16
5.6.130.0070.04018.28
5.6.120.0070.04021.02
5.6.110.0100.05021.02
5.6.100.0170.07721.07
5.6.90.0200.07021.11
5.6.80.0130.07020.36
5.6.70.0430.06720.38
5.5.350.0230.08320.38
5.5.340.0030.05318.11
5.5.330.0030.05320.41
5.5.320.0030.06020.26
5.5.310.0200.04020.34
5.5.300.0000.06318.07
5.5.290.0070.05318.07
5.5.280.0030.08720.88
5.5.270.0100.04020.80
5.5.260.0030.04720.80
5.5.250.0070.03720.65
5.5.240.0030.08720.16
5.4.450.0030.05319.43
5.4.440.0130.07319.31
5.4.430.0100.07019.55
5.4.420.0100.06319.40
5.4.410.0130.03719.12
5.4.400.0170.04319.16
5.4.390.0070.04019.14
5.4.380.0170.06319.15
5.4.370.0070.06018.85
5.4.360.0130.07019.15
5.4.350.0130.06719.16
5.4.340.0000.05018.87
5.4.320.0100.07719.14
5.4.310.0000.05319.16
5.4.300.0070.07719.07
5.4.290.0100.07718.86
5.4.280.0100.07719.24
5.4.270.0030.03719.23
5.4.260.0070.04319.19
5.4.250.0000.04019.13
5.4.240.0100.06719.17
5.4.230.0000.05019.14
5.4.220.0070.05019.14
5.4.210.0070.07319.14
5.4.200.0030.05019.11
5.4.190.0030.04018.91
5.4.180.0070.05319.19
5.4.170.0030.04019.13
5.4.160.0100.06319.10
5.4.150.0200.06318.91
5.4.140.0070.04316.60
5.4.130.0100.03016.39
5.4.120.0130.04316.51
5.4.110.0130.03016.48
5.4.100.0130.06016.42
5.4.90.0000.05716.48
5.4.80.0030.05316.46
5.4.70.0070.06316.44
5.4.60.0000.07716.40
5.4.50.0070.07316.27
5.4.40.0030.06316.38
5.4.30.0030.03716.38
5.4.20.0100.07016.40
5.4.10.0100.06716.34
5.4.00.0070.07315.91
5.3.290.0130.06714.68
5.3.280.0030.04314.52
5.3.270.0070.07314.75
5.3.260.0130.07014.75
5.3.250.0100.03314.62
5.3.240.0030.03714.61
5.3.230.0070.03714.66
5.3.220.0100.06314.58
5.3.210.0070.07014.73
5.3.200.0070.07714.61
5.3.190.0070.03714.57
5.3.180.0070.04714.64
5.3.170.0070.07314.57
5.3.160.0000.07314.60
5.3.150.0100.06714.72
5.3.140.0070.04714.56
5.3.130.0000.04714.55
5.3.120.0030.05714.63
5.3.110.0130.05314.58
5.3.100.0100.04314.06
5.3.90.0100.05013.91
5.3.80.0070.04314.07
5.3.70.0030.03714.07
5.3.60.0070.03314.06
5.3.50.0070.03713.95
5.3.40.0030.06314.02
5.3.30.0030.04013.92
5.3.20.0030.07313.70
5.3.10.0070.04713.61
5.3.00.0070.04013.64
5.2.170.0030.03011.22
5.2.160.0100.05711.15
5.2.150.0070.03310.96
5.2.140.0030.04711.30
5.2.130.0030.06311.05
5.2.120.0000.05011.11
5.2.110.0070.04311.25
5.2.100.0000.04011.09
5.2.90.0000.03311.08
5.2.80.0000.03311.17
5.2.70.0070.02711.25
5.2.60.0070.06310.99
5.2.50.0100.05310.86
5.2.40.0030.03710.87
5.2.30.0030.04710.85
5.2.20.0030.03010.85
5.2.10.0000.04010.86
5.2.00.0070.02310.76
5.1.60.0000.02710.01
5.1.50.0100.0509.97
5.1.40.0030.0239.97
5.1.30.0030.03710.33
5.1.20.0000.05010.34
5.1.10.0030.04310.21
5.1.00.0000.05010.02
5.0.50.0030.0378.50
5.0.40.0070.0208.25
5.0.30.0000.0678.24
5.0.20.0030.0208.18
5.0.10.0000.0278.18
5.0.00.0000.0338.16
4.4.90.0000.0177.78
4.4.80.0000.0307.78
4.4.70.0030.0177.78
4.4.60.0000.0177.78
4.4.50.0030.0177.78
4.4.40.0030.0337.78
4.4.30.0000.0177.78
4.4.20.0000.0377.78
4.4.10.0000.0377.78
4.4.00.0030.0537.78
4.3.110.0030.0337.78
4.3.100.0000.0277.78
4.3.90.0030.0137.78
4.3.80.0070.0277.78
4.3.70.0000.0177.78
4.3.60.0070.0307.78
4.3.50.0030.0337.78
4.3.40.0000.0537.78
4.3.30.0030.0337.78
4.3.20.0030.0337.78
4.3.10.0000.0277.78
4.3.00.0070.0177.78

preferences:
45.43 ms | 401 KiB | 5 Q