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; // function calls*tick_handler()/ new D(); tick_handler(); 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.0120.00318.31
8.3.50.0030.01422.05
8.3.40.0070.00718.58
8.3.30.0070.00718.89
8.3.20.0070.00020.22
8.3.10.0040.00422.05
8.3.00.0080.00022.37
8.2.180.0190.00016.63
8.2.170.0070.00722.96
8.2.160.0030.01719.13
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0130.00626.16
8.2.120.0040.00419.36
8.2.110.0080.00320.52
8.2.100.0060.00617.78
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0080.00017.36
8.2.60.0050.00517.91
8.2.50.0080.00018.07
8.2.40.0050.00318.03
8.2.30.0080.00017.80
8.2.20.0000.00717.39
8.2.10.0070.00017.60
8.2.00.0000.00717.53
8.1.280.0160.00325.92
8.1.270.0040.00421.95
8.1.260.0020.00526.35
8.1.250.0030.00528.09
8.1.240.0060.00320.87
8.1.230.0040.00717.52
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0090.00017.10
8.1.190.0050.00317.16
8.1.180.0000.00818.50
8.1.170.0000.00818.59
8.1.160.0040.00422.11
8.1.150.0050.00218.39
8.1.140.0020.00517.24
8.1.130.0000.00717.66
8.1.120.0030.00317.33
8.1.110.0020.00517.20
8.1.100.0040.00417.37
8.1.90.0030.00517.32
8.1.80.0040.00417.33
8.1.70.0030.00317.32
8.1.60.0080.00017.51
8.1.50.0040.00417.27
8.1.40.0000.00717.36
8.1.30.0000.00717.50
8.1.20.0040.00417.52
8.1.10.0050.00317.29
8.1.00.0000.01017.24
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0040.00418.31
8.0.270.0040.00417.05
8.0.260.0030.00316.76
8.0.250.0050.00316.85
8.0.240.0030.00316.86
8.0.230.0030.00316.88
8.0.220.0030.00316.73
8.0.210.0030.00316.86
8.0.200.0000.00716.77
8.0.190.0000.00816.92
8.0.180.0040.00416.73
8.0.170.0000.00716.70
8.0.160.0040.00416.85
8.0.150.0040.00416.76
8.0.140.0020.00516.78
8.0.130.0060.00013.29
8.0.120.0000.00816.84
8.0.110.0050.00216.71
8.0.100.0040.00416.75
8.0.90.0000.00716.70
8.0.80.0110.01016.78
8.0.70.0050.00216.81
8.0.60.0020.00516.64
8.0.50.0000.00716.61
8.0.30.0140.00716.97
8.0.20.0140.00517.40
8.0.10.0000.00816.82
8.0.00.0210.02216.64
7.4.330.0050.00015.00
7.4.320.0000.00616.45
7.4.300.0030.00316.59
7.4.290.0070.00016.54
7.4.280.0030.00316.46
7.4.270.0000.00616.59
7.4.260.0030.00416.40
7.4.250.0040.00416.50
7.4.240.0010.00616.52
7.4.230.0040.00416.49
7.4.220.0100.01316.55
7.4.210.0070.00916.49
7.4.200.0030.00316.66
7.4.190.0070.00016.50
7.4.160.0060.01016.42
7.4.150.0110.00717.40
7.4.140.0080.01017.86
7.4.130.0090.01116.51
7.4.120.0100.00916.46
7.4.110.0100.00716.37
7.4.100.0060.01016.62
7.4.90.0100.01016.70
7.4.80.0070.01019.39
7.4.70.0070.01016.36
7.4.60.0080.00816.49
7.4.50.0090.00016.59
7.4.40.0080.00822.77
7.4.30.0140.00316.46
7.4.00.0030.00714.86
7.3.330.0020.00213.38
7.3.320.0000.00513.34
7.3.310.0020.00516.16
7.3.300.0030.00316.27
7.3.290.0090.00616.29
7.3.280.0050.01116.31
7.3.270.0030.01317.40
7.3.260.0090.00916.32
7.3.250.0070.01216.35
7.3.240.0110.00516.30
7.3.230.0100.00716.39
7.3.210.0130.00316.53
7.3.200.0000.01719.39
7.3.190.0080.01116.53
7.3.180.0090.01316.42
7.3.170.0070.01016.36
7.3.160.0120.00316.35
7.3.120.0060.01014.74
7.3.10.0000.01416.28
7.3.00.0000.00816.42
7.2.330.0100.00716.60
7.2.320.0110.01116.57
7.2.310.0100.01316.54
7.2.300.0080.00916.59
7.2.290.0120.00916.66
7.2.130.0110.00316.32
7.2.120.0050.01016.74
7.2.110.0030.01216.33
7.2.100.0040.00816.54
7.2.90.0000.01316.80
7.2.80.0110.00416.87
7.2.70.0040.00816.46
7.2.60.0050.00516.61
7.2.50.0070.00716.57
7.2.40.0030.01016.55
7.2.30.0030.00816.39
7.2.20.0050.00516.52
7.2.10.0120.00016.67
7.2.00.0030.01218.10
7.1.250.0070.00715.37
7.1.200.0070.00715.42
7.1.100.0000.01617.84
7.1.70.0060.00916.96
7.1.60.0100.01319.82
7.1.50.0040.01916.83
7.1.00.0030.07322.51
7.0.200.0060.01016.83
7.0.140.0000.07322.12
7.0.60.0000.04319.82
7.0.50.0030.04017.86
7.0.40.0070.04020.30
7.0.30.0370.04320.05
7.0.20.0270.04320.10
7.0.10.0330.02720.19
7.0.00.0100.08020.22
5.6.280.0100.06721.12
5.6.210.0100.08320.57
5.6.200.0100.04718.18
5.6.190.0130.08020.61
5.6.180.3670.04020.63
5.6.170.0130.04720.54
5.6.160.0030.06020.61
5.6.150.0030.05318.15
5.6.140.0070.08018.11
5.6.130.0030.04318.23
5.6.120.0130.04320.99
5.6.110.0000.06021.13
5.6.100.0100.08720.97
5.6.90.0100.07021.10
5.6.80.0070.06720.48
5.6.70.0430.06320.28
5.5.350.0100.07320.43
5.5.340.0130.04717.95
5.5.330.0000.04320.27
5.5.320.0170.07320.27
5.5.310.0170.04320.52
5.5.300.0100.07718.04
5.5.290.0000.07718.10
5.5.280.0100.07720.88
5.5.270.0070.03720.73
5.5.260.0230.06020.88
5.5.250.0070.08320.63
5.5.240.0070.03320.23
5.4.450.0130.05019.17
5.4.440.0100.05719.64
5.4.430.0170.04319.32
5.4.420.0100.04719.19
5.4.410.0230.06319.20
5.4.400.0070.04718.99
5.4.390.0200.04719.17
5.4.380.0270.07019.22
5.4.370.0270.06719.14
5.4.360.0200.04318.84
5.4.350.0200.06019.00
5.4.340.0270.03719.17
5.4.320.0200.05319.00
5.4.310.0270.05319.21
5.4.300.0170.05318.94
5.4.290.0170.04719.12
5.4.280.0170.06019.21
5.4.270.0100.07719.21
5.4.260.0170.03319.14
5.4.250.0230.07319.14
5.4.240.0130.07318.94
5.4.230.0230.04019.07
5.4.220.0200.05019.30
5.4.210.0200.04319.23
5.4.200.0170.03319.11
5.4.190.0270.05019.18
5.4.180.0270.06719.30
5.4.170.0230.07319.08
5.4.160.0130.07319.05
5.4.150.0170.04719.13
5.4.140.0170.07316.39
5.4.130.0200.04016.36
5.4.120.0170.03716.36
5.4.110.0200.03316.61
5.4.100.0170.07016.51
5.4.90.0130.03716.59
5.4.80.0230.04716.49
5.4.70.0170.03316.59
5.4.60.0130.04016.35
5.4.50.0130.03716.51
5.4.40.0130.03716.25
5.4.30.0130.04016.50
5.4.20.0130.04016.52
5.4.10.0200.03316.48
5.4.00.0200.03715.96
5.3.290.0270.03014.58
5.3.280.0230.07014.52
5.3.270.0170.07314.66
5.3.260.0170.05714.72
5.3.250.0170.03714.60
5.3.240.0170.07714.52
5.3.230.0200.03714.61
5.3.220.0230.04314.64
5.3.210.0270.06714.51
5.3.200.0200.04014.47
5.3.190.0200.03714.56
5.3.180.0200.07314.79
5.3.170.0270.07014.68
5.3.160.0270.04014.48
5.3.150.0230.07314.54
5.3.140.0130.05014.70
5.3.130.0270.04714.70
5.3.120.0300.06714.63
5.3.110.0270.06014.60
5.3.100.0270.04313.96
5.3.90.0270.04014.09
5.3.80.0130.05013.95
5.3.70.0200.06313.93
5.3.60.0400.03313.92
5.3.50.0270.06313.87
5.3.40.0270.07013.85
5.3.30.0270.06713.96
5.3.20.0200.04713.61
5.3.10.0330.07313.59
5.3.00.0200.07313.61
5.2.170.0200.05012.73
5.2.160.0270.03012.73
5.2.150.0130.06712.73
5.2.140.0100.04012.73
5.2.130.0130.03712.73
5.2.120.0170.02712.73
5.2.110.0170.03012.73
5.2.100.0170.03012.73
5.2.90.0170.03712.73
5.2.80.0130.03012.73
5.2.70.0300.02712.73
5.2.60.0130.02712.73
5.2.50.0270.03312.73
5.2.40.0130.02712.73
5.2.30.0030.03312.73
5.2.20.0170.02312.73
5.2.10.0130.03012.73
5.2.00.0130.02712.73
5.1.60.0130.02312.73
5.1.50.0130.02012.73
5.1.40.0100.02312.73
5.1.30.0070.02712.73
5.1.20.0130.02312.73
5.1.10.0170.02312.73
5.1.00.0170.02012.73
5.0.50.0030.02012.73
5.0.40.0000.02312.73
5.0.30.0070.03312.73
5.0.20.0070.01712.73
5.0.10.0070.01712.73
5.0.00.0030.03312.73
4.4.90.0030.02012.73
4.4.80.0100.01012.73
4.4.70.0000.01712.73
4.4.60.0070.01312.73
4.4.50.0030.01712.73
4.4.40.0100.01712.73
4.4.30.0100.01012.73
4.4.20.0030.01312.73
4.4.10.0030.01712.73
4.4.00.0070.02012.73
4.3.110.0000.02012.73
4.3.100.0030.01712.73
4.3.90.0070.02712.73
4.3.80.0100.02012.73
4.3.70.0030.01712.73
4.3.60.0000.01712.73
4.3.50.0100.01012.73
4.3.40.0030.02312.73
4.3.30.0070.01312.73
4.3.20.0030.01312.73
4.3.10.0000.01712.73
4.3.00.0030.01312.73

preferences:
45.73 ms | 400 KiB | 5 Q