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 C\E(); tick_handler(); F: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.0140.00716.88
8.3.50.0110.00921.93
8.3.40.0070.00718.71
8.3.30.0120.00318.96
8.3.20.0070.00020.04
8.3.10.0080.00023.70
8.3.00.0090.00020.86
8.2.180.0120.00318.01
8.2.170.0100.00322.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0120.00326.16
8.2.120.0020.00522.13
8.2.110.0030.00622.16
8.2.100.0120.00017.78
8.2.90.0040.00418.71
8.2.80.0040.00417.97
8.2.70.0060.00317.50
8.2.60.0030.00617.91
8.2.50.0080.00018.07
8.2.40.0040.00417.91
8.2.30.0050.00317.84
8.2.20.0080.00017.39
8.2.10.0050.00317.54
8.2.00.0050.00317.42
8.1.280.0160.00325.92
8.1.270.0040.00422.13
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0090.00023.83
8.1.230.0060.00619.00
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0050.00317.27
8.1.180.0080.00018.10
8.1.170.0040.00418.57
8.1.160.0070.00021.90
8.1.150.0050.00318.51
8.1.140.0000.00717.31
8.1.130.0000.00717.81
8.1.120.0040.00417.24
8.1.110.0040.00417.19
8.1.100.0070.00017.21
8.1.90.0000.00717.20
8.1.80.0000.00717.33
8.1.70.0000.00717.28
8.1.60.0080.00017.45
8.1.50.0000.00917.38
8.1.40.0040.00417.43
8.1.30.0040.00417.41
8.1.20.0040.00417.54
8.1.10.0070.00017.39
8.1.00.0000.01017.29
8.0.300.0070.00018.77
8.0.290.0040.00316.92
8.0.280.0030.00318.29
8.0.270.0000.00717.12
8.0.260.0000.00616.66
8.0.250.0050.00216.79
8.0.240.0070.00016.77
8.0.230.0030.00316.88
8.0.220.0030.00316.73
8.0.210.0000.00816.84
8.0.200.0000.00716.82
8.0.190.0000.00716.77
8.0.180.0070.00016.71
8.0.170.0030.00516.74
8.0.160.0030.00316.85
8.0.150.0070.00016.71
8.0.140.0050.00216.69
8.0.130.0000.00513.20
8.0.120.0070.00016.68
8.0.110.0070.00016.82
8.0.100.0050.00216.63
8.0.90.0080.00016.93
8.0.80.0100.01016.77
8.0.70.0030.00716.67
8.0.60.0030.00616.85
8.0.50.0000.00716.71
8.0.30.0080.00916.99
8.0.20.0100.00917.40
8.0.10.0000.00816.97
8.0.00.0160.00416.62
7.4.330.0000.00515.00
7.4.320.0000.00616.50
7.4.300.0030.00316.48
7.4.290.0000.00716.46
7.4.280.0030.00816.34
7.4.270.0030.00316.46
7.4.260.0080.00016.44
7.4.250.0070.00016.46
7.4.240.0020.00516.53
7.4.230.0000.00716.55
7.4.220.0060.00916.44
7.4.210.0050.00916.44
7.4.200.0040.00416.56
7.4.190.0000.00716.39
7.4.160.0120.00316.66
7.4.150.0100.01017.40
7.4.140.0090.01117.86
7.4.130.0060.01216.43
7.4.120.0130.00616.59
7.4.110.0100.00816.41
7.4.100.0170.00316.34
7.4.90.0120.00616.53
7.4.80.0110.00719.39
7.4.70.0040.01216.52
7.4.60.0040.01416.43
7.4.50.0040.00016.61
7.4.40.0070.01022.77
7.4.30.0040.01116.50
7.4.00.0110.00515.08
7.3.330.0000.00513.38
7.3.320.0000.00713.31
7.3.310.0030.00316.35
7.3.300.0030.00316.18
7.3.290.0030.01016.36
7.3.280.0110.00716.29
7.3.270.0120.00617.40
7.3.260.0130.01016.30
7.3.250.0100.00816.37
7.3.240.0160.00016.35
7.3.230.0090.00916.46
7.3.210.0100.00716.45
7.3.200.0110.00719.39
7.3.190.0120.00916.29
7.3.180.0070.01016.30
7.3.170.0060.01016.27
7.3.160.0120.00316.25
7.3.120.0070.01014.74
7.3.110.0060.01014.87
7.3.100.0060.01214.73
7.3.90.0070.00714.67
7.3.80.0040.01114.82
7.3.70.0050.00314.95
7.3.60.0000.01414.55
7.3.50.0000.01014.58
7.3.40.0030.00614.84
7.3.30.0040.00814.53
7.3.20.0030.00616.60
7.3.10.0060.00616.39
7.3.00.0040.01416.59
7.2.330.0120.00616.56
7.2.320.0000.01816.31
7.2.310.0070.01016.59
7.2.300.0100.00516.50
7.2.290.0100.00716.20
7.2.250.0070.01314.93
7.2.240.0170.00014.89
7.2.230.0060.00914.76
7.2.220.0040.01114.70
7.2.210.0030.01414.89
7.2.200.0000.01614.94
7.2.190.0000.01414.91
7.2.180.0030.01015.05
7.2.170.0040.01114.87
7.2.160.0070.01014.93
7.2.150.0030.00916.56
7.2.140.0030.01316.89
7.2.130.0040.01116.85
7.2.120.0040.00716.76
7.2.110.0080.00416.69
7.2.100.0060.00916.82
7.2.90.0000.01516.75
7.2.80.0030.00916.84
7.2.70.0030.00616.50
7.2.60.0030.01016.59
7.2.50.0070.01016.73
7.2.40.0090.00616.64
7.2.30.0040.00816.80
7.2.20.0090.00916.70
7.2.10.0030.01016.80
7.2.00.0060.00617.90
7.1.330.0030.01415.68
7.1.320.0060.01215.22
7.1.310.0100.00315.44
7.1.300.0070.00315.71
7.1.290.0030.01015.67
7.1.280.0030.00815.38
7.1.270.0000.01015.62
7.1.260.0060.00315.57
7.1.250.0070.00715.46
7.1.240.0000.01115.43
7.1.230.0030.01315.48
7.1.220.0130.00015.62
7.1.210.0000.00815.73
7.1.200.0040.00915.61
7.1.190.0060.00615.70
7.1.180.0070.00815.57
7.1.170.0030.01015.45
7.1.160.0120.00015.71
7.1.150.0070.00715.57
7.1.140.0030.00515.61
7.1.130.0030.00515.75
7.1.120.0060.00615.59
7.1.110.0030.01315.69
7.1.100.0090.00516.70
7.1.90.0070.00715.26
7.1.80.0060.00815.35
7.1.70.0050.00416.38
7.1.60.0030.01517.43
7.1.50.0030.01716.31
7.1.40.0110.00015.48
7.1.30.0070.00415.55
7.1.20.0080.00515.57
7.1.10.0100.00315.27
7.1.00.0090.03518.96
7.0.330.0070.00715.37
7.0.320.0040.00714.98
7.0.310.0000.01515.19
7.0.300.0000.01614.95
7.0.290.0040.00415.46
7.0.280.0050.00315.01
7.0.270.0040.00815.38
7.0.260.0040.01215.10
7.0.250.0070.01015.32
7.0.240.0080.00315.24
7.0.230.0120.00015.46
7.0.220.0100.00315.53
7.0.210.0110.00415.17
7.0.200.0010.01015.99
7.0.190.0080.00415.22
7.0.180.0120.00015.05
7.0.170.0000.01414.96
7.0.160.0000.01415.16
7.0.150.0090.00915.21
7.0.140.0050.03718.65
7.0.130.0030.01215.26
7.0.120.0030.00615.52
7.0.110.0030.00715.11
7.0.100.0030.01215.04
7.0.90.0030.00815.46
7.0.80.0200.03017.64
7.0.70.0180.04017.64
7.0.60.0350.03817.64
7.0.50.0280.04617.81
7.0.40.0050.04016.82
7.0.30.0090.02116.56
7.0.20.0040.02516.77
7.0.10.0040.02716.73
7.0.00.0120.03816.59
5.6.400.0070.00314.11
5.6.390.0030.00614.19
5.6.380.0000.01014.49
5.6.370.0070.00414.39
5.6.360.0100.00314.16
5.6.350.0000.01414.14
5.6.340.0000.01413.71
5.6.330.0030.00613.93
5.6.320.0070.00714.14
5.6.310.0030.01014.19
5.6.300.0080.00014.09
5.6.290.0070.00414.11
5.6.280.0050.05117.57
5.6.270.0080.00014.18
5.6.260.0030.01314.39
5.6.250.0060.00914.20
5.6.240.0100.00714.21
5.6.230.0120.04317.45
5.6.220.0100.02417.38
5.6.210.0050.02617.32
5.6.200.0050.04317.64
5.6.190.0030.02617.66
5.6.180.0000.03717.54
5.6.170.0080.02317.70
5.6.160.0090.02417.56
5.6.150.0130.03517.44
5.6.140.0070.04217.64
5.6.130.0030.02817.61
5.6.120.0040.03817.43
5.6.110.0050.03317.61
5.6.100.0060.03817.51
5.6.90.0050.02517.58
5.6.80.0070.03017.43
5.6.70.0070.02217.23
5.6.60.0070.03717.21
5.6.50.0090.04117.12
5.6.40.0100.04017.15
5.6.30.0130.03517.06
5.6.20.0050.04717.32
5.6.10.0100.03517.28
5.6.00.0090.02917.19
5.5.380.0090.00614.13
5.5.370.0080.02817.30
5.5.360.0060.02817.19
5.5.350.0060.02617.51
5.5.340.0020.02717.50
5.5.330.0090.02117.32
5.5.320.0050.02317.48
5.5.310.0070.02317.60
5.5.300.0070.04017.40
5.5.290.0060.02117.44
5.5.280.0060.02217.49
5.5.270.0100.02817.41
5.5.260.0060.03117.45
5.5.250.0060.02517.27
5.5.240.0050.02117.14
5.5.230.0060.02416.96
5.5.220.0050.03817.02
5.5.210.0070.04417.01
5.5.200.0050.04117.13
5.5.190.0100.04317.02
5.5.180.0070.03716.98
5.5.170.0090.00614.21
5.5.160.0020.04917.04
5.5.150.0080.04217.20
5.5.140.0020.04317.15
5.5.130.0030.02817.14
5.5.120.0080.04117.16
5.5.110.0060.04817.07
5.5.100.0080.03017.02
5.5.90.0020.03217.02
5.5.80.0070.04316.93
5.5.70.0120.03717.01
5.5.60.0080.04016.94
5.5.50.0030.04216.93
5.5.40.0050.03016.89
5.5.30.0070.03916.97
5.5.20.0040.04416.86
5.5.10.0070.03216.84
5.5.00.0050.04117.03
5.4.450.0030.02216.03
5.4.440.0070.02015.96
5.4.430.0070.02216.11
5.4.420.0020.03416.12
5.4.410.0030.02316.00
5.4.400.0120.01215.82
5.4.390.0020.02415.90
5.4.380.0020.02615.89
5.4.370.0050.04215.96
5.4.360.0060.04015.86
5.4.350.0050.04015.79
5.4.340.0080.04115.91
5.4.330.0080.00412.68
5.4.320.0100.04015.78
5.4.310.0030.04615.91
5.4.300.0100.03815.90
5.4.290.0050.04015.91
5.4.280.0040.02215.86
5.4.270.0040.03515.90
5.4.260.0100.03815.78
5.4.250.0050.03815.86
5.4.240.0050.04015.81
5.4.230.0080.04015.81
5.4.220.0030.04015.85
5.4.210.0140.03515.79
5.4.200.0120.03815.88
5.4.190.0050.04115.81
5.4.180.0020.03815.78
5.4.170.0100.03515.77
5.4.160.0050.02715.75
5.4.150.0050.04015.95
5.4.140.0030.02814.46
5.4.130.0050.02714.57
5.4.120.0140.03014.64
5.4.110.0070.03214.62
5.4.100.0050.03814.62
5.4.90.0100.03314.58
5.4.80.0030.03814.53
5.4.70.0070.02314.62
5.4.60.0060.03614.57
5.4.50.0050.02714.57
5.4.40.0070.03114.60
5.4.30.0180.01814.50
5.4.20.0050.03914.58
5.4.10.0070.03514.54
5.4.00.0020.03214.25
5.3.290.0050.03713.68
5.3.280.0080.03713.71
5.3.270.0080.03913.68
5.3.260.0070.03013.63
5.3.250.0080.03513.61
5.3.240.0030.02513.64
5.3.230.0040.03813.71
5.3.220.0020.04213.63
5.3.210.0030.03213.61
5.3.200.0020.04413.68
5.3.190.0080.03613.60
5.3.180.0020.02813.58
5.3.170.0090.03113.68
5.3.160.0040.03013.67
5.3.150.0050.02313.67
5.3.140.0060.03613.63
5.3.130.0030.04313.68
5.3.120.0030.04013.62
5.3.110.0060.03313.69
5.3.100.0060.01813.38
5.3.90.0080.03613.38
5.3.80.0040.03713.32
5.3.70.0100.03713.31
5.3.60.0070.03713.31
5.3.50.0020.03413.35
5.3.40.0030.02813.34
5.3.30.0100.03313.31
5.3.20.0080.03513.14
5.3.10.0070.04013.16
5.3.00.0030.03513.16
5.2.170.0070.05312.62
5.2.160.0030.05712.62
5.2.150.0070.06312.62
5.2.140.0070.05712.62
5.2.130.0030.05712.62
5.2.120.0100.05712.62
5.2.110.0070.05012.62
5.2.100.0100.06012.62
5.2.90.0100.04712.62
5.2.80.0070.05312.62
5.2.70.0030.06012.62
5.2.60.0000.05012.62
5.2.50.0070.06312.62
5.2.40.0030.05712.62
5.2.30.0100.05012.62
5.2.20.0100.05012.62
5.2.10.0070.04712.62
5.2.00.0030.06012.62
5.1.60.0000.03312.62
5.1.50.0030.05312.62
5.1.40.0000.04312.62
5.1.30.0100.05012.62
5.1.20.0100.03312.62
5.1.10.0070.05312.62
5.1.00.0030.05312.62
5.0.50.0100.03712.62
5.0.40.0030.04312.62
5.0.30.0130.05312.62
5.0.20.0070.03312.62
5.0.10.0030.04712.62
5.0.00.0070.06312.62
4.4.90.0000.03712.62
4.4.80.0070.02712.62
4.4.70.0000.02012.62
4.4.60.0100.02312.62
4.4.50.0030.03012.62
4.4.40.0000.03312.62
4.4.30.0030.03312.62
4.4.20.0000.03712.62
4.4.10.0000.04312.62
4.4.00.0070.04712.62
4.3.110.0000.03012.62
4.3.100.0070.03012.62
4.3.90.0000.03012.62
4.3.80.0100.04312.62
4.3.70.0070.03012.62
4.3.60.0030.03312.62
4.3.50.0030.03312.62
4.3.40.0000.04712.62
4.3.30.0000.03712.62
4.3.20.0000.02712.62
4.3.10.0000.02712.62
4.3.00.0030.03712.62

preferences:
44.97 ms | 400 KiB | 5 Q