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 B; use B\D, C\E as F; declare(ticks=1); function tick_handler() { echo "tick_handler() called\n"; } class D { function foo() { echo __NAMESPACE__;}} //* namespace{ use B\D, C\E as F; echo __NAMESPACE__; // function calls*tick_handler()/ new D(); tick_handler(); echo __NAMESPACE__; D: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.60.0110.01116.50
8.3.50.0150.00321.87
8.3.40.0120.00618.54
8.3.30.0060.00818.79
8.3.20.0000.00720.23
8.3.10.0040.00423.56
8.3.00.0040.00419.13
8.2.180.0140.00418.31
8.2.170.0090.00922.96
8.2.160.0070.00720.34
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0130.00626.16
8.2.120.0000.00822.09
8.2.110.0100.00022.30
8.2.100.0040.00717.84
8.2.90.0000.00819.05
8.2.80.0040.00417.97
8.2.70.0050.00517.38
8.2.60.0040.00417.68
8.2.50.0080.00018.07
8.2.40.0060.00317.97
8.2.30.0030.00617.83
8.2.20.0040.00417.42
8.2.10.0040.00417.83
8.2.00.0000.00717.54
8.1.280.0100.00325.92
8.1.270.0080.00023.87
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.92
8.1.230.0090.00319.00
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0000.00917.25
8.1.190.0030.00517.40
8.1.180.0040.00418.10
8.1.170.0040.00418.54
8.1.160.0040.00421.84
8.1.150.0000.00718.37
8.1.140.0040.00417.23
8.1.130.0000.00717.73
8.1.120.0030.00317.38
8.1.110.0060.00317.33
8.1.100.0040.00417.34
8.1.90.0050.00317.22
8.1.80.0080.00017.20
8.1.70.0070.00017.30
8.1.60.0030.00517.43
8.1.50.0050.00217.36
8.1.40.0040.00417.37
8.1.30.0000.00917.39
8.1.20.0000.00817.42
8.1.10.0000.00817.27
8.1.00.0030.00617.19
8.0.300.0040.00418.77
8.0.290.0000.00717.05
8.0.280.0030.00318.28
8.0.270.0070.00017.20
8.0.260.0080.00016.76
8.0.250.0030.00316.86
8.0.240.0040.00416.91
8.0.230.0040.00416.92
8.0.220.0030.00316.70
8.0.210.0040.00416.80
8.0.200.0060.00016.84
8.0.190.0050.00216.86
8.0.180.0000.00816.89
8.0.170.0080.00016.82
8.0.160.0030.00316.69
8.0.150.0070.00016.61
8.0.140.0070.00316.61
8.0.130.0000.00513.32
8.0.120.0040.00416.82
8.0.110.0070.00016.84
8.0.100.0040.00416.77
8.0.90.0040.00416.80
8.0.80.0050.01016.79
8.0.70.0000.00716.70
8.0.60.0050.00316.76
8.0.50.0000.00716.65
8.0.30.0100.01116.89
8.0.20.0150.00817.40
8.0.10.0000.00816.92
8.0.00.0060.01516.72
7.4.330.0030.00315.00
7.4.320.0060.00016.36
7.4.300.0000.00616.48
7.4.290.0030.00616.42
7.4.280.0030.00516.55
7.4.270.0060.00016.42
7.4.260.0040.00416.43
7.4.250.0050.00216.36
7.4.240.0030.00516.50
7.4.230.0000.00716.61
7.4.220.0090.00916.52
7.4.210.0090.00516.40
7.4.200.0000.00716.49
7.4.190.0050.00316.61
7.4.160.0170.00416.41
7.4.150.0110.00617.40
7.4.140.0090.00917.86
7.4.130.0110.00516.61
7.4.120.0100.01016.41
7.4.110.0040.01316.46
7.4.100.0070.01316.71
7.4.90.0070.01316.50
7.4.80.0170.00019.39
7.4.70.0100.00716.46
7.4.60.0090.01316.36
7.4.50.0060.00316.50
7.4.40.0140.00322.77
7.4.30.0080.00816.46
7.4.00.0060.01015.04
7.3.330.0020.00213.34
7.3.320.0060.00013.32
7.3.310.0000.00716.33
7.3.300.0050.00216.32
7.3.290.0090.00616.34
7.3.280.0070.01016.31
7.3.270.0120.00617.40
7.3.260.0090.01316.42
7.3.250.0100.01316.54
7.3.240.0030.01416.34
7.3.230.0060.01116.39
7.3.210.0130.00616.34
7.3.200.0030.01519.39
7.3.190.0060.01616.63
7.3.180.0030.01216.33
7.3.170.0060.01216.45
7.3.160.0130.00316.52
7.3.120.0130.00314.73
7.3.110.0070.01114.96
7.3.100.0080.00814.99
7.3.90.0070.00714.98
7.3.80.0000.01814.96
7.3.70.0030.01014.97
7.3.60.0030.00914.38
7.3.50.0120.00414.64
7.3.40.0030.01314.93
7.3.30.0060.00314.56
7.3.20.0120.00316.62
7.3.10.0030.01216.69
7.3.00.0040.00816.48
7.2.330.0100.00816.69
7.2.320.0110.00816.58
7.2.310.0100.00716.58
7.2.300.0140.00316.56
7.2.290.0100.00616.37
7.2.250.0090.00915.00
7.2.240.0070.01315.14
7.2.230.0110.00714.68
7.2.220.0120.00014.68
7.2.210.0100.00714.88
7.2.200.0040.01114.97
7.2.190.0120.00615.03
7.2.180.0100.00715.00
7.2.170.0130.00315.13
7.2.110.1060.00016.50
7.2.60.0070.00716.77
7.2.00.0150.00619.36
7.1.330.0000.01115.29
7.1.320.0030.01215.89
7.1.310.0030.00615.83
7.1.300.0060.00915.50
7.1.290.0000.01115.44
7.1.280.0030.00715.82
7.1.270.0130.00315.36
7.1.260.0110.00315.85
7.1.200.0040.00415.54
7.1.100.0040.01318.16
7.1.70.0000.00916.97
7.1.60.0090.01519.33
7.1.50.0000.01116.91
7.1.00.0070.07322.32
7.0.200.0070.00416.42
7.0.140.0030.07022.08
7.0.60.0070.08020.08
7.0.50.0100.04317.87
7.0.40.0230.07320.21
7.0.30.0470.04720.33
7.0.20.0330.06720.03
7.0.10.0030.06720.33
7.0.00.0070.09020.33
5.6.280.0030.07320.93
5.6.210.0200.06720.48
5.6.200.0200.02718.18
5.6.190.0100.04320.60
5.6.180.0270.08020.61
5.6.170.0270.07320.71
5.6.160.0100.06020.46
5.6.150.0100.08018.29
5.6.140.0030.05018.18
5.6.130.0170.05018.18
5.6.120.0070.04721.01
5.6.110.0100.07321.05
5.6.100.0170.07321.14
5.6.90.0200.07021.00
5.6.80.0130.07320.39
5.5.350.0070.07320.41
5.5.340.0000.07717.95
5.5.330.0030.08720.25
5.5.320.0300.06720.34
5.5.310.0330.04320.23
5.5.300.0130.06717.99
5.5.290.0070.03718.05
5.5.280.0000.07320.99
5.5.270.0070.03720.84
5.5.260.0200.07320.75
5.5.250.0100.07720.46
5.5.240.4130.03320.27
5.4.450.0770.04319.21
5.4.440.0900.07019.28
5.4.430.1030.08019.30
5.4.420.0400.06019.41
5.4.410.0730.05319.32
5.4.400.0930.05319.12
5.4.390.0030.06319.25
5.4.380.0870.06318.50
5.4.370.0370.06318.73
5.4.360.0330.06318.58
5.4.350.0200.05718.79
5.4.340.0270.04318.74
5.4.320.0090.03712.50
5.4.310.0060.04012.50
5.4.300.0070.05112.50
5.4.290.0080.05312.50
5.4.280.0080.03412.40
5.4.270.0060.04612.40
5.4.260.0090.04412.40
5.4.250.0040.04012.39
5.4.240.0100.04912.40
5.4.230.0050.03812.39
5.4.220.0110.03412.39
5.4.210.0090.05012.39
5.4.200.0070.03612.39
5.4.190.0170.04112.39
5.4.180.0140.04312.39
5.4.170.0140.04512.39
5.4.160.0120.04912.39
5.4.150.0240.06612.39
5.4.140.0170.04012.07
5.4.130.0170.04012.06
5.4.120.0110.04512.02
5.4.110.0170.04012.02
5.4.100.0100.04712.02
5.4.90.0150.04212.02
5.4.80.0160.04112.01
5.4.70.0160.04012.02
5.4.60.0100.04612.02
5.4.50.0180.03912.01
5.4.40.0160.04012.00
5.4.30.0140.04311.99
5.4.20.0170.04712.00
5.4.10.0190.03711.99
5.4.00.0190.03611.48
5.3.290.0060.03912.80
5.3.280.0100.03512.71
5.3.270.0190.07212.73
5.3.260.0120.04812.72
5.3.250.0110.04812.72
5.3.240.0250.06612.72
5.3.230.0220.04112.71
5.3.220.0140.04712.68
5.3.210.0220.04112.68
5.3.200.0160.04412.68
5.3.190.0170.04312.68
5.3.180.0140.04512.67
5.3.170.0210.03812.67
5.3.160.0170.04212.68
5.3.150.0120.04712.67
5.3.140.0130.04712.66
5.3.130.0250.06512.66
5.3.120.0180.04212.66
5.3.110.0170.04212.66
5.3.100.0150.04412.13
5.3.90.0140.04612.11
5.3.80.0170.04312.11
5.3.70.0180.04312.11
5.3.60.0130.04712.09
5.3.50.0150.04512.03
5.3.40.0220.07112.03
5.3.30.0140.04612.01
5.3.20.0120.04711.78
5.3.10.0240.03511.74
5.3.00.0180.03911.72
5.2.170.0110.0389.18
5.2.160.0160.0329.18
5.2.150.0190.0299.18
5.2.140.0140.0349.18
5.2.130.0140.0359.14
5.2.120.0160.0319.14
5.2.110.0160.0329.15
5.2.100.0170.0309.15
5.2.90.0110.0379.14
5.2.80.0180.0319.13
5.2.70.0110.0359.14
5.2.60.0130.0339.09
5.2.50.0100.0379.06
5.2.40.0080.0409.04
5.2.30.0170.0319.01
5.2.20.0100.0379.01
5.2.10.0100.0398.92
5.2.00.0120.0338.78
5.1.60.0090.0308.07
5.1.50.0110.0298.06
5.1.40.0090.0308.06
5.1.30.0120.0308.39
5.1.20.0130.0308.43
5.1.10.0180.0288.14
5.1.00.0130.0298.14
5.0.50.0100.0246.63
5.0.40.0120.0196.48
5.0.30.0110.0366.30
5.0.20.0150.0196.27
5.0.10.0130.0296.25
5.0.00.0040.0406.23
4.4.90.0060.0194.78
4.4.80.0100.0144.75
4.4.70.0060.0204.75
4.4.60.0090.0174.76
4.4.50.0080.0174.77
4.4.40.0060.0304.71
4.4.30.0240.0624.76
4.4.20.0060.0194.84
4.4.10.0250.0614.85
4.4.00.0060.0304.76
4.3.110.0060.0184.67
4.3.100.0130.0724.66
4.3.90.0080.0184.63
4.3.80.0290.0704.58
4.3.70.0050.0194.63
4.3.60.0050.0194.63
4.3.50.0260.0584.63
4.3.40.0090.0254.53
4.3.30.0060.0173.29
4.3.20.0050.0183.29
4.3.10.0040.0193.23
4.3.00.0070.01315.61

preferences:
32.99 ms | 400 KiB | 5 Q