3v4l.org

run code in 300+ PHP versions simultaneously
<?php use B\D, C\E as F; namespace A ; use B\D, C\E as F; // function calls function foo() { echo __NAMESPACE__;} namespace C; use B\D, C\E as F; declare(ticks=1); function tick_handler() { echo "tick_handler() called\n"; } class E { function foo() { echo __NAMESPACE__;}} //* namespace{ use B\D, C\E as F; // function calls*tick_handler()/ new E(); tick_handler(); foo(); // first tries to call "foo" defined in namespace "A" // then calls global function "foo" new D(); // using import rules, creates object of class "D" defined in namespace "B" // if not found, it tries to autoload class "B\D" new F(); // using import rules, creates object of class "E" defined in namespace "C" // if not found, it tries to autoload class "C\E" new \B(); // creates object of class "B" defined in global scope // if not found, it tries to autoload class "B" new \D(); // creates object of class "D" defined in global scope // if not found, it tries to autoload class "D" new \F(); // creates object of class "F" defined in global scope // if no ?>

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.40.0090.00618.64
8.3.30.0040.01118.64
8.3.20.0000.00818.64
8.3.10.0000.00820.36
8.3.00.0070.00319.15
8.2.170.0210.00022.96
8.2.160.0070.01019.33
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0040.00419.71
8.2.110.0070.00420.89
8.2.100.0030.00917.72
8.2.90.0030.00719.09
8.2.80.0000.00717.92
8.2.70.0000.01017.13
8.2.60.0050.00317.90
8.2.50.0030.00518.07
8.2.40.0020.00518.09
8.2.30.0040.00417.98
8.2.20.0000.00817.43
8.2.10.0040.00417.41
8.2.00.0040.00417.50
8.1.270.0040.00424.66
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00320.60
8.1.230.0040.00721.03
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0040.00417.23
8.1.190.0070.00017.40
8.1.180.0050.00318.10
8.1.170.0080.00018.81
8.1.160.0040.00418.66
8.1.150.0000.00718.58
8.1.140.0030.00617.30
8.1.130.0000.00717.78
8.1.120.0040.00417.26
8.1.110.0070.00017.36
8.1.100.0040.00417.39
8.1.90.0040.00417.30
8.1.80.0030.00317.39
8.1.70.0000.00717.29
8.1.60.0090.00017.33
8.1.50.0000.00817.30
8.1.40.0030.00517.40
8.1.30.0000.00817.49
8.1.20.0060.00317.43
8.1.10.0080.00017.36
8.1.00.0060.00317.34
8.0.300.0000.00819.68
8.0.290.0040.00416.63
8.0.280.0030.00318.29
8.0.270.0060.00017.12
8.0.260.0070.00016.70
8.0.250.0000.00816.88
8.0.240.0040.00416.80
8.0.230.0030.00316.87
8.0.220.0000.00716.86
8.0.210.0000.00816.70
8.0.200.0040.00416.79
8.0.190.0070.00016.88
8.0.180.0070.00016.82
8.0.170.0040.00416.87
8.0.160.0000.00716.86
8.0.150.0000.00816.71
8.0.140.0030.00716.75
8.0.130.0030.00313.33
8.0.120.0070.00016.67
8.0.110.0040.00416.76
8.0.100.0050.00416.77
8.0.90.0030.00316.72
8.0.80.0040.01516.78
8.0.70.0000.00716.84
8.0.60.0050.00516.76
8.0.50.0000.00716.75
8.0.30.0050.01316.98
8.0.20.0050.01316.96
8.0.10.0000.00816.81
8.0.00.0080.01016.64
7.4.330.0020.00212.89
7.4.320.0060.00016.38
7.4.300.0060.00016.50
7.4.290.0030.00316.54
7.4.280.0000.00716.41
7.4.270.0000.00716.50
7.4.260.0030.00313.25
7.4.250.0000.00916.52
7.4.240.0050.00216.56
7.4.230.0000.00716.25
7.4.220.0110.00716.45
7.4.210.0110.00516.47
7.4.200.0070.00016.34
7.4.190.0040.00416.32
7.4.160.0150.00316.36
7.4.150.0060.01216.48
7.4.140.0130.00916.53
7.4.130.0110.00716.47
7.4.120.0140.00316.49
7.4.110.0130.00316.27
7.4.100.0090.01316.38
7.4.90.0080.01516.46
7.4.80.0000.02116.37
7.4.70.0030.01416.25
7.4.60.0090.00916.64
7.4.50.0030.00616.49
7.4.40.0080.00816.19
7.4.30.0100.00616.38
7.4.10.0090.00914.89
7.4.00.0100.00714.92
7.3.330.0060.00013.18
7.3.320.0000.00613.32
7.3.310.0040.00416.20
7.3.300.0040.00416.32
7.3.290.0140.00016.32
7.3.280.0130.00816.31
7.3.270.0040.02016.48
7.3.260.0100.00716.48
7.3.250.0140.00616.24
7.3.240.0060.01116.36
7.3.230.0120.00616.48
7.3.210.0060.01216.50
7.3.200.0030.01519.39
7.3.190.0060.01516.50
7.3.180.0120.00316.23
7.3.170.0090.00616.36
7.3.160.0100.01016.40
7.3.130.0030.01214.54
7.3.120.0080.00914.93
7.3.110.0080.00814.86
7.3.100.0070.01014.86
7.3.90.0120.00214.91
7.3.80.0030.00614.84
7.3.70.0040.00914.80
7.3.60.0030.01114.84
7.3.50.0050.01014.77
7.3.40.0030.01014.77
7.3.30.0060.00914.69
7.3.20.0070.00716.52
7.3.10.0050.00816.53
7.3.00.0060.00616.49
7.2.330.0100.01016.51
7.2.320.0130.00616.69
7.2.310.0110.01216.72
7.2.300.0130.00316.74
7.2.290.0140.01016.39
7.2.260.0040.01514.77
7.2.250.0050.01315.07
7.2.240.0050.01214.98
7.2.230.0030.01114.93
7.2.220.0030.01314.91
7.2.210.0100.00314.86
7.2.200.0050.00714.97
7.2.190.0020.01014.87
7.2.180.0070.00814.65
7.2.170.0030.01115.00
7.2.160.0110.00414.60
7.2.150.0060.00916.47
7.2.140.0040.00716.69
7.2.130.0020.01216.76
7.2.120.0060.01016.87
7.2.110.0050.01016.59
7.2.100.0080.00716.72
7.2.90.0050.00916.86
7.2.80.0060.00616.71
7.2.70.0070.00616.61
7.2.60.0050.00916.81
7.2.50.0050.01116.69
7.2.40.0070.00816.81
7.2.30.0070.00816.67
7.2.20.0030.00816.68
7.2.10.0120.00516.75
7.2.00.0070.00617.40
7.1.330.0090.00615.71
7.1.320.0070.00715.58
7.1.310.0050.00915.70
7.1.300.0080.00815.64
7.1.290.0030.00715.50
7.1.280.0020.00815.66
7.1.270.0060.00615.47
7.1.260.0100.00415.46
7.1.250.0070.01015.68
7.1.240.0040.01415.71
7.1.230.0090.00615.63
7.1.220.0110.00415.70
7.1.210.0000.01215.75
7.1.200.0050.00815.59
7.1.190.0100.00315.65
7.1.180.0080.00815.27
7.1.170.0070.00715.64
7.1.160.0060.00615.61
7.1.150.0040.00815.47
7.1.140.0060.00915.42
7.1.130.0100.00715.62
7.1.120.0060.00315.75
7.1.110.0060.00615.84
7.1.100.0020.01016.81
7.1.90.0040.00715.86
7.1.80.0060.00915.75
7.1.70.0030.00916.23
7.1.60.0070.01217.49
7.1.50.0060.01116.18
7.1.40.0030.00715.39
7.1.30.0060.00615.79
7.1.20.0070.00715.52
7.1.10.0040.00415.61
7.1.00.0070.04019.07
7.0.330.0060.00515.35
7.0.320.0060.00615.33
7.0.310.0000.00815.51
7.0.300.0070.00715.18
7.0.290.0000.00815.25
7.0.280.0040.01115.16
7.0.270.0000.01715.26
7.0.260.0060.00615.26
7.0.250.0080.00415.22
7.0.240.0080.00315.44
7.0.230.0100.00715.53
7.0.220.0070.00315.39
7.0.210.0110.00015.40
7.0.200.0050.00515.99
7.0.190.0070.00715.21
7.0.180.0070.00415.30
7.0.170.0030.01015.41
7.0.160.0060.00615.47
7.0.150.0000.00915.16
7.0.140.0050.04018.72
7.0.130.0080.00015.00
7.0.120.0030.03218.69
7.0.110.0060.00915.41
7.0.100.0050.00314.99
7.0.90.0040.00715.29
7.0.80.0080.00415.34
7.0.70.0070.00715.44
7.0.60.0120.04317.69
7.0.50.0090.03516.61
7.0.40.0080.04015.49
7.0.30.0110.03315.71
7.0.20.0050.03415.48
7.0.10.0050.04315.58
7.0.00.0060.02215.63
5.6.400.0000.01214.32
5.6.390.0090.00014.19
5.6.380.0000.01114.26
5.6.370.0090.00914.46
5.6.360.0070.01014.41
5.6.350.0030.00914.23
5.6.340.0090.00614.23
5.6.330.0060.00314.52
5.6.320.0060.00913.92
5.6.310.0060.00614.26
5.6.300.0000.00914.03
5.6.290.0040.01114.05
5.6.280.0040.03917.46
5.6.270.0030.00914.25
5.6.260.0000.01414.40
5.6.250.0000.00814.34
5.6.240.0090.00614.02
5.6.230.0100.00614.08
5.6.220.0070.00314.09
5.6.210.0050.04817.52
5.6.200.0050.04216.14
5.6.190.0080.04616.10
5.6.180.0070.04716.23
5.6.170.0050.03116.21
5.6.160.0030.03016.37
5.6.150.0060.03516.23
5.6.140.0120.03216.07
5.6.130.0080.04016.28
5.6.120.0050.03316.03
5.6.110.0120.04216.16
5.6.100.0130.04016.15
5.6.90.0060.04216.28
5.6.80.0020.04615.93
5.6.70.0090.03815.80
5.6.60.0060.03015.88
5.6.50.0080.03315.82
5.6.40.0060.02915.96
5.6.30.0060.02315.95
5.6.20.0090.03815.96
5.6.10.0030.04515.84
5.6.00.0080.04115.99
5.5.380.0000.01114.25
5.5.370.0030.01214.14
5.5.360.0040.01114.59
5.5.350.0100.04717.41
5.5.340.0060.04716.12
5.5.330.0030.04616.25
5.5.320.0050.03016.10
5.5.310.0110.03416.07
5.5.300.0090.02715.86
5.5.290.0050.02815.98
5.5.280.0060.04216.13
5.5.270.0070.03515.96
5.5.260.0020.04315.94
5.5.250.0090.02715.99
5.5.240.0070.04515.79
5.5.230.0060.04115.86
5.5.220.0060.03015.79
5.5.210.0100.02815.64
5.5.200.0110.03215.70
5.5.190.0030.03715.70
5.5.180.0080.02515.77
5.5.170.0090.00614.17
5.5.160.0000.04415.65
5.5.150.0080.03915.64
5.5.140.0070.04415.66
5.5.130.0080.04215.60
5.5.120.0020.02915.57
5.5.110.0050.03015.64
5.5.100.0060.04015.72
5.5.90.0070.03915.70
5.5.80.0080.03315.77
5.5.70.0060.04115.60
5.5.60.0020.02315.58
5.5.50.0070.01815.61
5.5.40.0070.02315.76
5.5.30.0030.02215.53
5.5.20.0050.02215.68
5.5.10.0000.02615.49
5.5.00.0030.02215.67
5.4.450.0050.03015.22
5.4.440.0050.04415.25
5.4.430.0100.03815.23
5.4.420.0020.04815.22
5.4.410.0070.04215.09
5.4.400.0080.04015.06
5.4.390.0050.03215.09
5.4.380.0060.02915.06
5.4.370.0030.03214.91
5.4.360.0060.04115.01
5.4.350.0120.01915.09
5.4.340.0030.03614.98
5.4.330.0000.00910.97
5.4.320.0070.03714.86
5.4.310.0090.03014.75
5.4.300.0050.04015.00
5.4.290.0020.02914.95
5.4.280.0070.04214.99
5.4.270.0050.04015.00
5.4.260.0050.03715.06
5.4.250.0090.02815.13
5.4.240.0080.03915.06
5.4.230.0030.02914.79
5.4.220.0050.02214.98
5.4.210.0050.02414.95
5.4.200.0020.02214.99
5.4.190.0080.01815.07
5.4.180.0020.02714.97
5.4.170.0040.02114.98
5.4.160.0020.02314.98
5.4.150.0060.02014.94
5.4.140.0010.02113.64
5.4.130.0070.01713.72
5.4.120.0030.02213.71
5.4.110.0050.02013.72
5.4.100.0040.01813.83
5.4.90.0030.02213.63
5.4.80.0020.02313.52
5.4.70.0020.02213.73
5.4.60.0030.02013.66
5.4.50.0000.02113.51
5.4.40.0050.01813.66
5.4.30.0030.01913.54
5.4.20.0030.02013.62
5.4.10.0050.01813.71
5.4.00.0030.02013.51
5.3.290.0030.02612.81
5.3.280.0020.02512.58
5.3.270.0050.02012.63
5.3.260.0100.01812.62
5.3.250.0000.02512.61
5.3.240.0070.01812.55
5.3.230.0050.02212.57
5.3.220.0030.02112.62
5.3.210.0020.02412.49
5.3.200.0060.01712.51
5.3.190.0000.02512.57
5.3.180.0050.02012.54
5.3.170.0030.02212.64
5.3.160.0050.01812.57
5.3.150.0070.01812.47
5.3.140.0030.02012.49
5.3.130.0050.02012.54
5.3.120.0020.02612.49
5.3.110.0030.02012.53
5.3.100.0020.02512.29
5.3.90.0030.01812.21
5.3.80.0030.02012.15
5.3.70.0020.02212.27
5.3.60.0010.02212.30
5.3.50.0050.01812.20
5.3.40.0030.02012.17
5.3.30.0030.02112.15
5.3.20.0040.01812.06
5.3.10.0050.01712.05
5.3.00.0070.03712.02
5.2.170.0030.02711.13
5.2.160.0030.02711.09
5.2.150.0000.03011.18
5.2.140.0030.02711.14
5.2.130.0030.03311.00
5.2.120.0000.03011.00
5.2.110.0030.04011.07
5.2.100.0030.05710.93
5.2.90.0070.04310.99
5.2.80.0100.03011.04
5.2.70.0030.06311.05
5.2.60.0000.06311.02
5.2.50.0000.04311.05
5.2.40.0070.05710.98
5.2.30.0030.06310.96
5.2.20.0030.06711.09
5.2.10.0070.05710.87
5.2.00.0070.04010.56
5.1.60.0030.0339.93
5.1.50.0030.06010.02
5.1.40.0070.0379.89
5.1.30.0070.06010.47
5.1.20.0100.04310.24
5.1.10.0070.05010.05
5.1.00.0070.03010.05
5.0.50.0030.0478.55
5.0.40.0030.0378.23
5.0.30.0130.0278.20
5.0.20.0030.0408.26
5.0.10.0070.0408.15
5.0.00.0000.0708.18
4.4.90.0000.0377.99
4.4.80.0030.0237.99
4.4.70.0070.0237.99
4.4.60.0000.0407.99
4.4.50.0000.0337.99
4.4.40.0000.0407.99
4.4.30.0000.0337.99
4.4.20.0030.0207.99
4.4.10.0000.0407.99
4.4.00.0000.0607.99
4.3.110.0070.0337.99
4.3.100.0070.0277.99
4.3.90.0030.0377.99
4.3.80.0030.0537.99
4.3.70.0000.0207.99
4.3.60.0030.0277.99
4.3.50.0030.0337.99
4.3.40.0030.0437.99
4.3.30.0000.0207.99
4.3.20.0030.0207.99
4.3.10.0000.0337.99
4.3.00.0000.0177.99

preferences:
52.09 ms | 400 KiB | 5 Q