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(); \C\E::foo(); // 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.70.0150.00416.58
8.3.60.0100.01018.31
8.3.50.0160.01222.05
8.3.40.0110.00418.75
8.3.30.0100.00318.80
8.3.20.0080.00020.28
8.3.10.0000.00822.14
8.3.00.0050.00322.50
8.2.180.0060.00916.73
8.2.170.0110.00422.96
8.2.160.0120.00320.71
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0060.00319.36
8.2.110.0040.00422.02
8.2.100.0110.00017.78
8.2.90.0030.00519.09
8.2.80.0050.00317.97
8.2.70.0060.00317.38
8.2.60.0060.00317.80
8.2.50.0000.00818.07
8.2.40.0000.00817.91
8.2.30.0040.00417.92
8.2.20.0040.00417.52
8.2.10.0070.00017.48
8.2.00.0080.00017.47
8.1.280.0080.00825.92
8.1.270.0050.00323.71
8.1.260.0000.00726.35
8.1.250.0000.00828.09
8.1.240.0050.00523.86
8.1.230.0080.00419.02
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.10
8.1.190.0040.00417.40
8.1.180.0000.00718.10
8.1.170.0040.00418.64
8.1.160.0040.00421.87
8.1.150.0000.00718.41
8.1.140.0000.00717.22
8.1.130.0000.00717.64
8.1.120.0050.00317.34
8.1.110.0040.00417.18
8.1.100.0050.00317.21
8.1.90.0000.00717.32
8.1.80.0040.00417.21
8.1.70.0030.00317.22
8.1.60.0030.00617.35
8.1.50.0000.00717.28
8.1.40.0090.00017.34
8.1.30.0050.00317.40
8.1.20.0000.00917.40
8.1.10.0040.00417.34
8.1.00.0030.00617.30
8.0.300.0030.00318.77
8.0.290.0070.00016.93
8.0.280.0030.00318.32
8.0.270.0000.00817.00
8.0.260.0040.00416.87
8.0.250.0030.00316.80
8.0.240.0000.00716.84
8.0.230.0030.00516.79
8.0.220.0070.00016.78
8.0.210.0000.00716.86
8.0.200.0060.00016.87
8.0.190.0030.00316.87
8.0.180.0030.00716.71
8.0.170.0030.00616.77
8.0.160.0040.00416.88
8.0.150.0030.00616.78
8.0.140.0070.00016.64
8.0.130.0000.00613.20
8.0.120.0070.00016.68
8.0.110.0070.00016.75
8.0.100.0050.00316.62
8.0.90.0000.00716.86
8.0.80.0040.01116.76
8.0.70.0070.00016.66
8.0.60.0040.00416.88
8.0.50.0040.00416.88
8.0.30.0170.00517.10
8.0.20.0090.01117.40
8.0.10.0000.00716.79
8.0.00.0100.01016.68
7.4.330.0000.00515.00
7.4.320.0050.00216.40
7.4.300.0040.00416.45
7.4.290.0040.00416.45
7.4.280.0080.00016.52
7.4.270.0000.00716.59
7.4.260.0000.00816.49
7.4.250.0040.00416.41
7.4.240.0040.00416.46
7.4.230.0000.00716.52
7.4.220.0100.00716.62
7.4.210.0040.01016.53
7.4.200.0040.00416.36
7.4.190.0040.00416.72
7.4.160.0060.00916.54
7.4.150.0030.01617.40
7.4.140.0110.00917.86
7.4.130.0100.01216.52
7.4.120.0140.00416.46
7.4.110.0070.01016.60
7.4.100.0120.01216.72
7.4.90.0140.00316.41
7.4.80.0160.00419.39
7.4.70.0120.00416.55
7.4.60.0090.01416.39
7.4.50.0000.00916.52
7.4.40.0100.00622.77
7.4.30.0040.01216.60
7.4.10.0060.00916.00
7.4.00.0040.01215.14
7.3.330.0030.00313.20
7.3.320.0000.00513.36
7.3.310.0000.00716.36
7.3.300.0070.00016.33
7.3.290.0160.00016.39
7.3.280.0100.00716.38
7.3.270.0130.01117.40
7.3.260.0110.00716.39
7.3.250.0110.01016.52
7.3.240.0040.01216.33
7.3.230.0060.00916.45
7.3.210.0130.01016.51
7.3.200.0030.01419.39
7.3.190.0090.01216.29
7.3.180.0090.00616.32
7.3.170.0080.00816.52
7.3.160.0060.01416.55
7.3.130.0030.01516.00
7.3.120.0070.01015.32
7.3.110.0090.00715.42
7.3.100.0070.00615.54
7.3.90.0080.00715.36
7.3.80.0060.00615.37
7.3.70.0050.00915.48
7.3.60.0030.01215.41
7.3.50.0080.00315.35
7.3.40.0050.00715.39
7.3.30.0030.00915.44
7.3.20.0040.01216.64
7.3.10.0080.00616.47
7.3.00.0070.00516.61
7.2.330.0140.01016.63
7.2.320.0080.00816.71
7.2.310.0070.01016.50
7.2.300.0100.01016.51
7.2.290.0080.00816.67
7.2.260.0060.00616.00
7.2.250.0070.01115.43
7.2.240.0070.01115.38
7.2.230.0100.00515.35
7.2.220.0100.00615.28
7.2.210.0050.00915.34
7.2.200.0090.00815.36
7.2.190.0110.00315.53
7.2.180.0050.00615.47
7.2.170.0090.00715.50
7.2.160.0040.01116.00
7.2.150.0040.01116.96
7.2.140.0060.00916.84
7.2.130.0030.01116.64
7.2.120.0040.00816.85
7.2.110.0030.00816.61
7.2.100.0060.00516.70
7.2.90.0090.00516.84
7.2.80.0100.00516.71
7.2.70.0080.00616.53
7.2.60.0040.01116.67
7.2.50.0040.00516.71
7.2.40.0030.01016.67
7.2.30.0120.00516.85
7.2.20.0030.00616.69
7.2.10.0050.01116.70
7.2.00.0090.00817.65
7.1.330.0090.00615.87
7.1.320.0090.00615.84
7.1.310.0060.00715.82
7.1.300.0060.00715.78
7.1.290.0040.00815.88
7.1.280.0060.00515.85
7.1.270.0050.00815.69
7.1.260.0020.00915.69
7.1.250.0060.00815.65
7.1.240.0070.00716.00
7.1.230.0030.00516.00
7.1.220.0130.00016.00
7.1.210.0070.01016.00
7.1.200.0050.00715.90
7.1.190.0030.00616.00
7.1.180.0000.01316.00
7.1.170.0110.00016.00
7.1.160.0040.01116.00
7.1.150.0090.00316.00
7.1.140.0040.00716.00
7.1.130.0070.00416.00
7.1.120.0040.00816.00
7.1.110.0000.01116.00
7.1.100.0000.01016.89
7.1.90.0030.01016.00
7.1.80.0030.00716.00
7.1.70.0050.00616.46
7.1.60.0060.00617.91
7.1.50.0080.01016.48
7.1.40.0030.01016.00
7.1.30.0070.00716.00
7.1.20.0110.00416.00
7.1.10.0100.00316.00
7.1.00.0080.03919.23
7.0.330.0000.01216.00
7.0.320.0080.00416.00
7.0.310.0090.00316.00
7.0.300.0040.00416.00
7.0.290.0050.00316.00
7.0.280.0090.00316.00
7.0.270.0110.00016.00
7.0.260.0060.00616.00
7.0.250.0030.00516.00
7.0.240.0030.01016.00
7.0.230.0060.00616.00
7.0.220.0040.00416.00
7.0.210.0000.00816.00
7.0.200.0040.00816.37
7.0.190.0050.00516.00
7.0.180.0000.00816.00
7.0.170.0040.01116.00
7.0.160.0090.00316.00
7.0.150.0090.00316.00
7.0.140.0040.03718.99
7.0.130.0030.01016.00
7.0.120.0030.00616.00
7.0.110.0090.00316.00
7.0.100.0070.00316.00
7.0.90.0030.01016.00
7.0.80.0000.01416.00
7.0.70.0030.00916.00
7.0.60.0080.03517.95
7.0.50.0080.02816.98
7.0.40.0110.04518.02
7.0.30.0300.03918.10
7.0.20.0160.03918.12
7.0.10.0080.02818.03
7.0.00.0020.03218.08
5.6.400.0000.01116.00
5.6.390.0080.00316.00
5.6.380.0090.00416.00
5.6.370.0080.00816.00
5.6.360.0070.00716.00
5.6.350.0060.00316.00
5.6.340.0040.01116.00
5.6.330.0040.00816.00
5.6.320.0040.00816.00
5.6.310.0060.00916.00
5.6.300.0090.00316.00
5.6.290.0000.00816.00
5.6.280.0100.03518.43
5.6.270.0090.00016.00
5.6.260.0100.00316.00
5.6.250.0100.00316.00
5.6.240.0000.01016.00
5.6.230.0060.00316.00
5.6.220.0000.01816.00
5.6.210.0140.03218.31
5.6.200.0070.03517.09
5.6.190.0030.02818.28
5.6.180.0060.03618.30
5.6.170.0240.03318.23
5.6.160.0090.04718.28
5.6.150.0050.03517.13
5.6.140.0050.03117.07
5.6.130.0100.03317.09
5.6.120.0120.03818.51
5.6.110.0050.04718.51
5.6.100.0050.04818.49
5.6.90.0080.03918.57
5.6.80.0050.04818.26
5.6.70.0270.03518.21
5.6.60.0030.00916.00
5.6.50.0100.00716.00
5.6.40.0100.01016.00
5.6.30.0030.01516.00
5.6.20.0060.00616.00
5.6.10.0070.00716.00
5.6.00.0040.01116.00
5.5.380.0030.01016.00
5.5.370.0070.00716.00
5.5.360.0000.01716.00
5.5.350.0030.04618.20
5.5.340.0070.02717.02
5.5.330.0040.02618.10
5.5.320.0180.03318.12
5.5.310.0150.04418.17
5.5.300.0070.04117.03
5.5.290.0100.04016.97
5.5.280.0040.04018.44
5.5.270.0030.02318.38
5.5.260.0090.04318.48
5.5.250.0060.04518.29
5.5.240.0050.04318.10
5.5.230.0160.00016.00
5.5.220.0100.00716.00
5.5.210.0030.01016.00
5.5.200.0060.00916.00
5.5.190.0040.01116.00
5.5.180.0000.01316.00
5.5.170.0070.00716.00
5.5.160.0090.00316.00
5.5.150.0110.00316.00
5.5.140.0090.00916.00
5.5.130.0090.00616.00
5.5.120.0030.01016.00
5.5.110.0000.01416.00
5.5.100.0030.01316.00
5.5.90.0000.01416.00
5.5.80.0030.00916.00
5.5.70.0060.00616.00
5.5.60.0100.00316.00
5.5.50.0100.00316.00
5.5.40.0080.00016.00
5.5.30.0030.00916.00
5.5.20.0060.00316.00
5.5.10.0100.00716.00
5.5.00.0070.00716.00
5.4.450.0250.02117.70
5.4.440.0100.02417.60
5.4.430.0100.02017.73
5.4.420.0250.02417.63
5.4.410.0080.03017.42
5.4.400.0120.03517.31
5.4.390.0050.03417.39
5.4.380.0070.03117.38
5.4.370.0170.02917.37
5.4.360.0150.02917.30
5.4.350.0150.03217.23
5.4.340.0130.03617.27
5.4.330.0040.00416.00
5.4.320.0030.02214.25
5.4.310.0050.01914.25
5.4.300.0080.01814.25
5.4.290.0050.02214.25
5.4.280.0030.02314.20
5.4.270.0060.02514.20
5.4.260.0040.02514.20
5.4.250.0030.02314.20
5.4.240.0050.02314.20
5.4.230.0020.02414.19
5.4.220.0050.02314.19
5.4.210.0040.02214.19
5.4.200.0060.02114.19
5.4.190.0090.02414.19
5.4.180.0090.02514.19
5.4.170.0090.02514.20
5.4.160.0110.02214.20
5.4.150.0090.02514.19
5.4.140.0100.02214.03
5.4.130.0110.02314.03
5.4.120.0120.01914.01
5.4.110.0090.02414.01
5.4.100.0100.02614.01
5.4.90.0120.02414.01
5.4.80.0070.02714.01
5.4.70.0110.02214.01
5.4.60.0130.02014.00
5.4.50.0100.02514.00
5.4.40.0100.03914.00
5.4.30.0100.02713.99
5.4.20.0130.02314.00
5.4.10.0090.02613.99
5.4.00.0120.02213.74
5.3.290.0030.02514.40
5.3.280.0050.02114.35
5.3.270.0100.02414.36
5.3.260.0130.02214.36
5.3.250.0140.02014.36
5.3.240.0120.02114.36
5.3.230.0070.02814.35
5.3.220.0100.02514.34
5.3.210.0140.02414.34
5.3.200.0110.02614.34
5.3.190.0140.02514.34
5.3.180.0110.02414.33
5.3.170.0110.02514.33
5.3.160.0170.03514.33
5.3.150.0140.02514.33
5.3.140.0090.02714.33
5.3.130.0090.02714.33
5.3.120.0130.02414.33
5.3.110.0170.03214.33
5.3.100.0120.02614.07
5.3.90.0110.02414.05
5.3.80.0130.04214.05
5.3.70.0100.02614.05
5.3.60.0090.02714.04
5.3.50.0100.02614.02
5.3.40.0080.02714.01
5.3.30.0120.02414.00
5.3.20.0100.02413.89
5.3.10.0090.02413.87
5.3.00.0110.02513.86
5.2.170.0110.0379.19
5.2.160.0100.0399.18
5.2.150.0140.0389.18
5.2.140.0140.0349.18
5.2.130.0130.0389.14
5.2.120.0140.0349.14
5.2.110.0100.0379.15
5.2.100.0150.0359.14
5.2.90.0280.0519.14
5.2.80.0180.0319.13
5.2.70.0130.0359.13
5.2.60.0110.0379.09
5.2.50.0130.0379.05
5.2.40.0120.0359.04
5.2.30.0100.0389.01
5.2.20.0150.0339.00
5.2.10.0120.0418.93
5.2.00.0100.0408.78
5.1.60.0180.0288.07
5.1.50.0150.0318.07
5.1.40.0170.0308.05
5.1.30.0400.0988.39
5.1.20.0180.0318.43
5.1.10.0210.0278.14
5.1.00.0160.0328.14
5.0.50.0070.0286.63
5.0.40.0090.0246.48
5.0.30.0240.0856.29
5.0.20.0120.0216.27
5.0.10.0100.0256.24
5.0.00.0080.0366.23
4.4.90.0080.0184.78
4.4.80.0070.0204.76
4.4.70.0070.0194.75
4.4.60.0070.0184.75
4.4.50.0040.0224.77
4.4.40.0120.0284.71
4.4.30.0070.0214.76
4.4.20.0060.0204.85
4.4.10.0060.0214.85
4.4.00.0100.0294.76
4.3.110.0070.0194.67
4.3.100.0110.0144.66
4.3.90.0070.0194.63
4.3.80.0080.0284.59
4.3.70.0070.0174.63
4.3.60.0090.0174.63
4.3.50.0060.0194.63
4.3.40.0080.0304.54
4.3.30.0050.0193.29
4.3.20.0040.0213.28
4.3.10.0050.0183.24
4.3.00.0100.01315.15

preferences:
50.81 ms | 401 KiB | 5 Q