3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar; include 'file1.php'; 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.0100.01018.56
8.3.50.0120.00721.94
8.3.40.0120.00318.78
8.3.30.0110.00319.17
8.3.20.0060.00320.38
8.3.10.0040.00421.95
8.3.00.0040.00422.43
8.2.180.0150.00418.79
8.2.170.0040.01122.96
8.2.160.0130.00720.77
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0000.00726.16
8.2.120.0120.00319.48
8.2.110.0060.00322.25
8.2.100.0110.00417.53
8.2.90.0050.00319.13
8.2.80.0000.01217.97
8.2.70.0030.00617.63
8.2.60.0040.00417.80
8.2.50.0060.00318.07
8.2.40.0060.00518.03
8.2.30.0050.00217.96
8.2.20.0000.00817.71
8.2.10.0040.00417.89
8.2.00.0040.00417.74
8.1.280.0090.01225.92
8.1.270.0050.00322.24
8.1.260.0000.00826.35
8.1.250.0000.00728.09
8.1.240.0030.00723.84
8.1.230.0090.00318.94
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0000.00817.39
8.1.180.0000.00818.10
8.1.170.0030.00618.70
8.1.160.0030.00722.03
8.1.150.0000.00818.51
8.1.140.0040.00417.31
8.1.130.0070.00017.68
8.1.120.0020.00517.41
8.1.110.0070.00417.32
8.1.100.0040.00317.41
8.1.90.0030.00517.37
8.1.80.0040.00317.28
8.1.70.0050.00217.32
8.1.60.0040.00417.60
8.1.50.0000.00717.52
8.1.40.0030.00717.41
8.1.30.0040.00417.62
8.1.20.0050.00317.73
8.1.10.0030.00617.61
8.1.00.0050.00217.38
8.0.300.0070.00018.77
8.0.290.0040.00417.05
8.0.280.0030.00318.57
8.0.270.0030.00317.25
8.0.260.0080.00016.88
8.0.250.0070.00017.13
8.0.240.0030.00317.10
8.0.230.0040.00416.97
8.0.220.0000.00717.02
8.0.210.0000.00717.06
8.0.200.0060.00016.96
8.0.190.0040.00417.02
8.0.180.0040.00416.99
8.0.170.0000.00817.10
8.0.160.0060.00316.91
8.0.150.0080.00317.03
8.0.140.0000.00716.88
8.0.130.0080.00013.53
8.0.120.0000.00816.93
8.0.110.0040.00416.93
8.0.100.0040.00417.09
8.0.90.0040.00416.83
8.0.80.0120.00617.04
8.0.70.0040.00416.90
8.0.60.0040.00416.94
8.0.50.0050.00216.91
8.0.30.0060.01817.10
8.0.20.0110.00817.40
8.0.10.0070.00017.07
8.0.00.0120.00616.75
7.4.330.0000.00515.00
7.4.320.0030.00316.39
7.4.300.0070.00016.52
7.4.290.0030.00316.61
7.4.280.0030.00316.60
7.4.270.0030.00316.64
7.4.260.0070.00016.52
7.4.250.0030.00616.41
7.4.240.0030.00416.64
7.4.230.0000.00716.74
7.4.220.0120.00616.63
7.4.210.0070.01016.61
7.4.200.0070.00016.44
7.4.190.0040.00416.48
7.4.160.0060.00916.48
7.4.150.0160.00017.40
7.4.140.0070.01217.86
7.4.130.0120.00716.49
7.4.120.0120.00616.68
7.4.110.0080.01016.57
7.4.100.0080.01116.64
7.4.90.0110.00816.55
7.4.80.0090.00916.32
7.4.70.0070.01016.46
7.4.60.0030.01316.52
7.4.50.0000.00816.57
7.4.40.0030.01322.77
7.4.30.0100.00716.61
7.4.10.0080.00916.54
7.4.00.0080.01015.89
7.3.330.0050.00013.47
7.3.320.0030.00313.46
7.3.310.0050.00216.43
7.3.300.0040.00416.33
7.3.290.0090.00616.42
7.3.280.0090.00816.47
7.3.270.0110.00717.40
7.3.260.0150.00416.55
7.3.250.0100.00816.52
7.3.240.0070.01016.45
7.3.230.0140.00716.53
7.3.210.0030.01516.39
7.3.200.0080.01219.39
7.3.190.0150.00516.56
7.3.180.0070.01416.63
7.3.170.0040.01216.70
7.3.160.0100.00716.45
7.3.130.0060.01316.45
7.3.120.0040.01215.87
7.3.110.0060.01016.30
7.3.100.0070.00716.42
7.3.90.0080.00616.48
7.3.80.0050.00816.39
7.3.70.0050.01016.39
7.3.60.0050.00716.43
7.3.50.0060.00716.36
7.3.40.0060.01016.41
7.3.30.0050.00716.38
7.3.20.0110.00218.18
7.3.10.0090.00618.20
7.3.00.0070.00718.19
7.2.330.0030.01416.45
7.2.320.0110.01116.49
7.2.310.0150.00816.54
7.2.300.0070.01016.63
7.2.290.0070.01416.85
7.2.260.0070.01216.56
7.2.250.0080.01316.57
7.2.240.0060.00916.60
7.2.230.0080.01016.54
7.2.220.0070.00916.68
7.2.210.0090.00616.42
7.2.200.0030.01016.56
7.2.190.0050.00816.50
7.2.180.0050.00816.50
7.2.170.0020.01216.48
7.2.160.0070.00516.61
7.2.150.0030.00818.56
7.2.140.0050.01018.49
7.2.130.0070.00918.48
7.2.120.0070.00618.36
7.2.110.0100.01018.48
7.2.100.0080.01018.35
7.2.90.0080.00518.55
7.2.80.0050.00918.46
7.2.70.0090.00718.44
7.2.60.0050.01317.81
7.2.50.0060.00818.43
7.2.40.0030.01118.46
7.2.30.0070.00818.39
7.2.20.0090.00618.41
7.2.10.0030.01018.23
7.2.00.0070.00718.78
7.1.330.0050.00817.25
7.1.320.0090.00317.29
7.1.310.0020.01017.29
7.1.300.0060.01017.18
7.1.290.0060.00617.20
7.1.280.0040.00617.26
7.1.270.0070.00717.30
7.1.260.0060.00817.28
7.1.250.0070.00917.27
7.1.240.0080.00417.27
7.1.230.0080.00417.23
7.1.220.0080.00617.32
7.1.210.0050.00717.28
7.1.200.0090.00416.72
7.1.190.0020.01117.24
7.1.180.0040.00917.38
7.1.170.0060.00817.29
7.1.160.0070.00917.33
7.1.150.0060.00817.41
7.1.140.0050.01117.30
7.1.130.0070.00917.30
7.1.120.0050.01117.34
7.1.110.0080.00717.37
7.1.100.0090.00617.60
7.1.90.0050.00917.26
7.1.80.0050.00917.25
7.1.70.0060.00317.29
7.1.60.0080.00718.13
7.1.50.0140.00623.12
7.1.40.0040.01117.34
7.1.30.0030.01117.26
7.1.20.0070.00617.37
7.1.10.0080.00517.21
7.1.00.0020.03218.88
7.0.330.0050.00717.01
7.0.320.0040.01116.95
7.0.310.0080.00316.96
7.0.300.0050.01016.93
7.0.290.0080.00817.00
7.0.280.0040.00917.04
7.0.270.0050.00616.89
7.0.260.0040.01016.81
7.0.250.0090.00517.19
7.0.240.0040.00717.06
7.0.230.0050.00516.87
7.0.220.0080.00516.95
7.0.210.0040.01116.93
7.0.200.0100.00117.00
7.0.190.0020.00916.96
7.0.180.0030.01216.99
7.0.170.0090.00616.99
7.0.160.0040.00717.06
7.0.150.0080.00816.99
7.0.140.0060.02918.60
7.0.130.0040.01216.88
7.0.120.0080.00816.96
7.0.110.0100.00516.99
7.0.100.0020.01217.07
7.0.90.0030.00916.98
7.0.80.0080.00816.94
7.0.70.0060.02818.53
7.0.60.0050.03218.51
7.0.50.0090.03018.56
7.0.40.0030.03116.56
7.0.30.0030.03516.59
7.0.20.0070.02516.65
7.0.10.0080.01616.60
7.0.00.0070.02316.59
5.6.400.0090.00515.86
5.6.390.0070.00915.71
5.6.380.0110.00315.78
5.6.370.0060.00715.79
5.6.360.0060.00915.94
5.6.350.0020.01215.88
5.6.340.0100.00815.74
5.6.330.0060.00715.88
5.6.320.0090.00515.88
5.6.310.0080.00715.90
5.6.300.0030.01115.95
5.6.290.0090.00515.79
5.6.280.0050.03017.37
5.6.270.0110.00315.84
5.6.260.0030.00915.95
5.6.250.0030.01315.83
5.6.240.0070.00915.71
5.6.230.0050.00715.82
5.6.220.0110.01617.38
5.6.210.0100.02717.32
5.6.200.0090.02317.50
5.6.190.0050.03117.44
5.6.180.0060.03217.48
5.6.170.0030.02317.45
5.6.160.0030.02717.56
5.6.150.0080.02517.49
5.6.140.0040.03117.54
5.6.130.0050.03317.50
5.6.120.0060.02317.51
5.6.110.0040.01917.44
5.6.100.0060.03017.48
5.6.90.0100.02317.51
5.6.80.0070.03017.32
5.6.70.0040.02117.21
5.6.60.0090.02717.16
5.6.50.0050.02717.17
5.6.40.0070.02317.23
5.6.30.0060.03017.24
5.6.20.0110.02017.12
5.6.10.0050.03417.24
5.6.00.0050.02817.20
5.5.380.0020.01215.57
5.5.370.0070.00715.52
5.5.360.0030.03317.15
5.5.350.0100.02617.30
5.5.340.0040.03417.38
5.5.330.0070.02517.34
5.5.320.0080.02817.27
5.5.310.0130.02917.42
5.5.300.0050.02317.27
5.5.290.0080.02417.31
5.5.280.0080.02517.27
5.5.270.0070.03117.31
5.5.260.0030.02517.27
5.5.250.0090.02417.26
5.5.240.0050.01717.11
5.5.230.0050.03117.17
5.5.220.0100.02417.12
5.5.210.0080.02717.07
5.5.200.0050.02817.05
5.5.190.0040.02517.17
5.5.180.0030.02416.99
5.5.170.0020.01215.63
5.5.160.0050.02317.05
5.5.150.0040.03117.11
5.5.140.0060.01917.12
5.5.130.0060.02117.12
5.5.120.0030.03217.11
5.5.110.0100.01917.16
5.5.100.0040.02716.99
5.5.90.0040.02616.95
5.5.80.0080.01817.06
5.5.70.0040.02817.08
5.5.60.0020.03516.95
5.5.50.0070.02217.17
5.5.40.0070.03017.08
5.5.30.0030.02217.15
5.5.20.0050.01917.09
5.5.10.0020.02417.05
5.5.00.0040.03216.99
5.4.450.0080.02915.16
5.4.440.0080.02015.29
5.4.430.0060.02915.09
5.4.420.0040.02215.15
5.4.410.0020.02115.15
5.4.400.0090.01515.07
5.4.390.0040.02615.02
5.4.380.0020.02115.02
5.4.370.0050.02515.06
5.4.360.0040.02115.15
5.4.350.0040.01715.20
5.4.340.0030.02915.08
5.4.330.0050.00613.21
5.4.320.0040.02715.00
5.4.310.0040.02115.08
5.4.300.0020.03515.06
5.4.290.0020.02415.06
5.4.280.0050.02715.09
5.4.270.0070.01615.06
5.4.260.0040.03114.95
5.4.250.0050.02815.08
5.4.240.0020.02915.12
5.4.230.0070.03015.10
5.4.220.0040.02715.05
5.4.210.0040.02915.08
5.4.200.0070.02915.10
5.4.190.0110.02415.06
5.4.180.0040.02315.09
5.4.170.0040.02815.11
5.4.160.0060.02215.08
5.4.150.0040.01615.05
5.4.140.0030.02214.25
5.4.130.0030.02214.26
5.4.120.0060.01614.22
5.4.110.0030.02114.33
5.4.100.0050.02914.28
5.4.90.0020.02914.19
5.4.80.0020.03014.20
5.4.70.0080.02314.23
5.4.60.0030.02414.11
5.4.50.0030.02414.25
5.4.40.0020.02814.27
5.4.30.0050.01914.18
5.4.20.0070.01614.18
5.4.10.0030.02714.22
5.4.00.0030.02314.08
5.3.290.0020.02413.77
5.3.280.0030.02013.68
5.3.270.0050.02113.80
5.3.260.0040.02413.86
5.3.250.0030.02613.77
5.3.240.0030.03013.73
5.3.230.0050.02413.72
5.3.220.0040.02513.76
5.3.210.0050.03213.80
5.3.200.0030.02913.75
5.3.190.0050.01813.80
5.3.180.0060.02313.77
5.3.170.0060.02713.79
5.3.160.0040.02713.80
5.3.150.0010.02013.80
5.3.140.0040.01913.77
5.3.130.0060.02813.84
5.3.120.0030.02113.78
5.3.110.0060.02413.78
5.3.100.0030.03113.71
5.3.90.0060.03013.57
5.3.80.0060.03313.58
5.3.70.0040.02613.61
5.3.60.0020.02213.54
5.3.50.0040.02513.54
5.3.40.0030.02813.51
5.3.30.0010.03013.60
5.3.20.0070.02313.44
5.3.10.0050.01813.41
5.3.00.0070.01713.42
5.2.170.0000.03711.04
5.2.160.0000.04711.06
5.2.150.0030.06011.10
5.2.140.0030.06011.06
5.2.130.0000.04010.83
5.2.120.0030.05010.89
5.2.110.0030.04011.00
5.2.100.0000.04011.06
5.2.90.0000.05711.00
5.2.80.0030.04311.05
5.2.70.0070.04310.89
5.2.60.0000.04710.95
5.2.50.0030.05710.83
5.2.40.0000.06310.81
5.2.30.0000.05710.90
5.2.20.0070.04711.01
5.2.10.0070.05710.88
5.2.00.0000.06010.73
5.1.60.0070.05010.19
5.1.50.0030.04710.19
5.1.40.0030.05010.19
5.1.30.0030.05010.24
5.1.20.0070.05010.36
5.1.10.0000.04710.19
5.1.00.0030.05310.19
5.0.50.0000.03310.19
5.0.40.0070.04010.19
5.0.30.0030.06010.19
5.0.20.0030.03710.19
5.0.10.0000.03710.19
5.0.00.0070.06310.19
4.4.90.0000.03710.19
4.4.80.0070.02710.19
4.4.70.0100.02710.19
4.4.60.0030.03010.19
4.4.50.0000.03010.19
4.4.40.0030.04710.19
4.4.30.0000.02710.19
4.4.20.0070.03010.19
4.4.10.0030.02310.19
4.4.00.0000.04310.19
4.3.110.0030.03010.19
4.3.100.0030.03010.19
4.3.90.0030.03310.19
4.3.80.0000.05710.19
4.3.70.0070.02010.19
4.3.60.0030.03010.19
4.3.50.0000.03010.19
4.3.40.0000.05010.19
4.3.30.0030.03310.19
4.3.20.0030.02310.19
4.3.10.0000.03010.19
4.3.00.0030.03310.19

preferences:
51.68 ms | 400 KiB | 5 Q