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; // 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; // 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.0110.00418.18
8.3.50.0130.00822.11
8.3.40.0090.00618.80
8.3.30.0070.00718.72
8.3.20.0080.00018.73
8.3.10.0060.00320.49
8.3.00.0060.00319.10
8.2.180.0070.01416.38
8.2.170.0110.01122.96
8.2.160.0030.01022.01
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00519.59
8.2.110.0060.00321.98
8.2.100.0040.00717.78
8.2.90.0000.00819.23
8.2.80.0050.00317.97
8.2.70.0000.00817.38
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0040.00418.09
8.2.30.0050.00219.77
8.2.20.0000.00717.58
8.2.10.0080.00017.50
8.2.00.0030.00617.55
8.1.280.0180.00425.92
8.1.270.0070.00023.99
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0050.00522.47
8.1.230.0000.01120.97
8.1.220.0000.00818.77
8.1.210.0040.00419.03
8.1.200.0070.00417.10
8.1.190.0070.00017.53
8.1.180.0040.00418.10
8.1.170.0040.00418.91
8.1.160.0070.00018.79
8.1.150.0040.00418.50
8.1.140.0040.00417.39
8.1.130.0030.00317.76
8.1.120.0000.00817.46
8.1.110.0050.00217.30
8.1.100.0080.00017.38
8.1.90.0000.00717.43
8.1.80.0070.00017.28
8.1.70.0030.00317.29
8.1.60.0050.00317.47
8.1.50.0050.00317.41
8.1.40.0000.00717.49
8.1.30.0070.00017.48
8.1.20.0030.00517.58
8.1.10.0040.00417.37
8.1.00.0030.00717.34
8.0.300.0070.00019.85
8.0.290.0040.00416.75
8.0.280.0070.00018.45
8.0.270.0000.00717.25
8.0.260.0070.00016.86
8.0.250.0000.00716.84
8.0.240.0000.00916.98
8.0.230.0040.00416.95
8.0.220.0070.00016.95
8.0.210.0040.00416.84
8.0.200.0030.00516.84
8.0.190.0080.00016.95
8.0.180.0000.00716.82
8.0.170.0060.00316.87
8.0.160.0030.00316.87
8.0.150.0000.00716.80
8.0.140.0040.00416.79
8.0.130.0000.00513.32
8.0.120.0040.00416.80
8.0.110.0030.00616.73
8.0.100.0000.00716.65
8.0.90.0070.00016.73
8.0.80.0070.01116.82
8.0.70.0030.00316.70
8.0.60.0000.00816.85
8.0.50.0040.00416.89
8.0.30.0100.01017.11
8.0.20.0120.00617.40
8.0.10.0040.00416.94
8.0.00.0070.01116.73
7.4.330.0000.00514.76
7.4.320.0030.00316.43
7.4.300.0060.00016.53
7.4.290.0000.00716.51
7.4.280.0000.00816.34
7.4.270.0000.00716.34
7.4.260.0080.00013.23
7.4.250.0050.00216.45
7.4.240.0050.00316.43
7.4.230.0000.00716.42
7.4.220.0090.01316.38
7.4.210.0110.00516.54
7.4.200.0000.00716.52
7.4.190.0030.00316.50
7.4.160.0130.00316.43
7.4.150.0150.00617.40
7.4.140.0100.00717.86
7.4.130.0060.01116.39
7.4.120.0080.01016.59
7.4.110.0150.00616.49
7.4.100.0120.00616.34
7.4.90.0100.00716.43
7.4.80.0130.00319.03
7.4.70.0130.00316.40
7.4.60.0100.00716.48
7.4.50.0040.00416.45
7.4.40.0070.01022.27
7.4.30.0100.01016.54
7.4.00.0070.00714.94
7.3.330.0050.00013.25
7.3.320.0050.00013.27
7.3.310.0050.00316.35
7.3.300.0040.00416.36
7.3.290.0060.00616.29
7.3.280.0090.00616.26
7.3.270.0130.00317.40
7.3.260.0100.01418.24
7.3.250.0110.01116.45
7.3.240.0100.00616.32
7.3.230.0050.01516.39
7.3.210.0060.00916.47
7.3.200.0090.00919.39
7.3.190.0070.01316.33
7.3.180.0070.00816.45
7.3.170.0130.00316.39
7.3.160.0130.00316.36
7.3.120.0100.01014.89
7.3.110.0100.00714.77
7.3.100.0110.00414.96
7.3.90.0070.00714.89
7.3.80.0030.01214.64
7.3.70.0030.01014.64
7.3.60.0080.01214.65
7.3.50.0110.00914.90
7.3.40.0030.00614.87
7.3.30.0040.00814.68
7.3.20.0100.00716.63
7.3.10.0040.01116.46
7.3.00.0050.00516.69
7.2.330.0070.01116.37
7.2.320.0060.01216.53
7.2.310.0160.00316.73
7.2.300.0040.01316.56
7.2.290.0000.01516.89
7.2.240.0030.01614.86
7.2.230.0000.01814.75
7.2.220.0090.00615.10
7.2.210.0070.00414.98
7.2.200.0000.01414.93
7.2.190.0120.00415.12
7.2.180.0030.01415.11
7.2.170.0000.01514.72
7.2.160.0070.01115.01
7.2.150.0120.00016.90
7.2.140.0150.00017.07
7.2.130.0150.00417.00
7.2.120.0040.00816.72
7.2.110.0060.00316.95
7.2.100.0090.00616.73
7.2.90.0040.01116.80
7.2.80.0060.01216.67
7.2.70.0130.00316.91
7.2.60.0120.00616.96
7.2.50.0070.00316.84
7.2.40.0070.00716.79
7.2.30.0060.00616.91
7.2.20.0070.00716.79
7.2.10.0040.01216.72
7.2.00.0120.00918.10
7.1.330.0060.00915.91
7.1.320.0090.00315.63
7.1.310.0030.01015.59
7.1.300.0040.00815.89
7.1.290.0070.00315.43
7.1.280.0070.00715.74
7.1.270.0110.00415.84
7.1.260.0100.00615.69
7.1.250.0100.00315.40
7.1.100.0060.00917.68
7.1.70.0070.00017.09
7.1.60.0160.00919.40
7.1.50.0100.01016.74
7.1.00.0070.03722.45
7.0.200.0040.00416.37
7.0.140.0000.07722.11
7.0.60.0030.08320.02
7.0.50.0100.07017.88
7.0.40.0370.06720.21
7.0.30.0230.05720.23
7.0.20.0170.05720.39
7.0.10.0330.07020.23
7.0.00.0170.04020.14
5.6.280.0000.07721.07
5.6.210.0000.06720.54
5.6.200.0130.07318.14
5.6.190.0200.04020.55
5.6.180.0300.07720.41
5.6.170.0370.07020.58
5.6.160.0200.03720.55
5.6.150.0230.03320.34
5.6.140.0230.03320.41
5.6.130.0170.04020.34
5.6.120.0100.04720.41
5.6.110.0130.04020.40
5.6.100.0130.04020.36
5.6.90.0200.03720.38
5.6.80.0130.04019.80
5.6.70.0130.04019.77
5.6.60.0100.04319.81
5.6.50.0130.04019.80
5.6.40.0070.04319.60
5.6.30.0170.04019.55
5.6.20.0200.04019.56
5.6.10.0170.03719.79
5.6.00.0130.04319.58
5.5.350.3870.04320.42
5.5.340.0070.05717.94
5.5.330.0230.06020.23
5.5.320.0230.05320.41
5.5.310.0070.06020.55
5.5.300.0100.04719.98
5.5.290.0170.04019.99
5.5.280.0100.05320.19
5.5.270.0130.04020.12
5.5.260.0030.05020.12
5.5.250.0100.04320.05
5.5.240.0170.04019.36
5.5.230.0170.03719.41
5.5.220.0170.03719.58
5.5.210.0100.04019.36
5.5.200.0130.04019.34
5.5.190.0170.03719.52
5.5.180.0100.04019.32
5.5.160.0270.06319.59
5.5.150.0200.04019.56
5.5.140.0200.06019.52
5.5.130.0230.08319.64
5.5.120.0070.06019.59
5.5.110.0270.07319.33
5.5.100.0270.06319.43
5.5.90.0300.07319.49
5.5.80.0270.07319.36
5.5.70.0200.04319.30
5.5.60.0200.08019.38
5.5.50.0270.07019.45
5.5.40.0200.07319.50
5.5.30.0170.07719.21
5.5.20.0230.06719.61
5.5.10.0170.07319.46
5.5.00.0170.07319.44
5.4.450.0170.03719.34
5.4.440.0100.04319.34
5.4.430.0200.03319.53
5.4.420.0130.04019.57
5.4.410.0100.04019.35
5.4.400.0130.03718.88
5.4.390.0130.03719.07
5.4.380.0100.04019.15
5.4.370.0130.04018.92
5.4.360.0130.04019.21
5.4.350.0100.04018.86
5.4.340.0330.08019.07
5.4.320.0130.05318.98
5.4.310.0130.04718.96
5.4.300.0430.06319.24
5.4.290.0300.06018.85
5.4.280.0170.07319.24
5.4.270.0270.05719.25
5.4.260.0230.04719.07
5.4.250.0270.04319.26
5.4.240.0230.09019.16
5.4.230.0200.07718.86
5.4.220.0230.03719.14
5.4.210.0230.04019.20
5.4.200.0200.04319.15
5.4.190.0230.06719.14
5.4.180.0200.07018.87
5.4.170.0200.07319.14
5.4.160.0330.04019.19
5.4.150.0230.04018.84
5.4.140.0300.04716.40
5.4.130.0200.06016.50
5.4.120.0170.04016.47
5.4.110.0100.04316.47
5.4.100.0170.04016.35
5.4.90.0100.05016.39
5.4.80.0270.03316.57
5.4.70.0200.07316.45
5.4.60.0230.07316.26
5.4.50.0200.07316.43
5.4.40.0200.07316.37
5.4.30.0400.05716.47
5.4.20.0230.06716.36
5.4.10.0170.08316.43
5.4.00.0230.05715.85
5.3.290.0130.04014.66
5.3.280.0130.05714.63
5.3.270.0230.06714.50
5.3.260.0130.08014.68
5.3.250.0230.05314.63
5.3.240.0230.07714.64
5.3.230.0330.03714.60
5.3.220.0200.03714.64
5.3.210.0170.05014.64
5.3.200.0130.05014.64
5.3.190.0300.03714.58
5.3.180.0200.04314.71
5.3.170.0330.04014.56
5.3.160.0270.06714.56
5.3.150.0170.05014.59
5.3.140.0230.05714.62
5.3.130.0230.06314.61
5.3.120.0300.04014.60
5.3.110.0170.07014.73
5.3.100.0200.05013.97
5.3.90.0300.06314.05
5.3.80.0430.03013.95
5.3.70.0230.05314.18
5.3.60.0230.04714.02
5.3.50.0230.05314.10
5.3.40.0270.06313.84
5.3.30.0100.04314.07
5.3.20.0330.03713.69
5.3.10.0270.06713.58
5.3.00.0230.05013.59
5.2.170.0200.03712.52
5.2.160.0200.06012.52
5.2.150.0130.03312.52
5.2.140.0130.06012.52
5.2.130.0130.04312.52
5.2.120.0300.03712.52
5.2.110.0130.05012.52
5.2.100.0200.04012.52
5.2.90.0170.03012.52
5.2.80.0100.03312.52
5.2.70.0200.05312.52
5.2.60.0170.06312.52
5.2.50.0130.04012.52
5.2.40.0300.04012.52
5.2.30.0170.05012.52
5.2.20.0200.05012.52
5.2.10.0170.05712.52
5.2.00.0200.06012.52
5.1.60.0100.03712.52
5.1.50.0070.03012.52
5.1.40.0130.04012.52
5.1.30.0200.04712.52
5.1.20.0230.04712.52
5.1.10.0170.03712.52
5.1.00.0170.02712.52
5.0.50.0100.02312.52
5.0.40.0070.02012.52
5.0.30.0070.07012.52
5.0.20.0030.05012.52
5.0.10.0100.03712.52
5.0.00.0070.06012.52
4.4.90.0100.03312.52
4.4.80.0070.03312.52
4.4.70.0100.02712.52
4.4.60.0070.02312.52
4.4.50.0130.02012.52
4.4.40.0030.03012.52
4.4.30.0130.01012.52
4.4.20.0130.03012.52
4.4.10.0070.02712.52
4.4.00.0100.02312.52
4.3.110.0070.02712.52
4.3.100.0200.02312.52
4.3.90.0100.03012.52
4.3.80.0100.02012.52
4.3.70.0130.03012.52
4.3.60.0030.02712.52
4.3.50.0070.03312.52
4.3.40.0070.05312.52
4.3.30.0070.03712.52
4.3.20.0030.03012.52
4.3.10.0030.03312.52
4.3.00.0000.03712.52

preferences:
57.03 ms | 401 KiB | 5 Q