3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(ticks=1); function tick_handler() { echo "tick_handler() called\n"; } 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; 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.0090.00616.75
8.3.50.0100.01021.93
8.3.40.0070.00718.66
8.3.30.0040.01118.69
8.3.20.0040.00420.34
8.3.10.0080.00023.62
8.3.00.0070.00020.69
8.2.180.0140.00716.63
8.2.170.0070.01322.96
8.2.160.0070.00722.08
8.2.150.0060.00324.18
8.2.140.0070.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00722.30
8.2.110.0030.00622.31
8.2.100.0070.00417.59
8.2.90.0000.00718.91
8.2.80.0000.00817.97
8.2.70.0000.00917.38
8.2.60.0030.00717.93
8.2.50.0030.00618.07
8.2.40.0040.00417.97
8.2.30.0080.00017.96
8.2.20.0040.00417.58
8.2.10.0040.00417.55
8.2.00.0000.00817.54
8.1.280.0120.00325.92
8.1.270.0070.00724.00
8.1.260.0040.00426.35
8.1.250.0090.00028.09
8.1.240.0090.00023.84
8.1.230.0110.00018.99
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0030.00617.22
8.1.190.0040.00417.41
8.1.180.0000.00818.10
8.1.170.0060.00318.50
8.1.160.0040.00421.94
8.1.150.0090.00018.59
8.1.140.0070.00017.32
8.1.130.0070.00017.62
8.1.120.0070.00017.34
8.1.110.0000.00817.37
8.1.100.0040.00417.36
8.1.90.0070.00017.37
8.1.80.0000.00717.32
8.1.70.0000.00717.27
8.1.60.0000.00917.44
8.1.50.0000.00717.26
8.1.40.0040.00417.45
8.1.30.0030.00717.47
8.1.20.0030.00617.52
8.1.10.0030.00517.32
8.1.00.0000.00717.19
8.0.300.0050.00218.77
8.0.290.0040.00416.92
8.0.280.0030.00318.31
8.0.270.0000.00717.04
8.0.260.0000.00616.59
8.0.250.0030.00316.78
8.0.240.0040.00416.89
8.0.230.0040.00416.77
8.0.220.0040.00416.85
8.0.210.0040.00416.86
8.0.200.0070.00016.83
8.0.190.0060.00316.75
8.0.180.0040.00416.88
8.0.170.0000.00816.86
8.0.160.0040.00416.79
8.0.150.0030.00316.82
8.0.140.0000.01016.74
8.0.130.0030.00313.31
8.0.120.0040.00416.74
8.0.110.0000.00716.86
8.0.100.0040.00416.76
8.0.90.0070.00016.85
8.0.80.0060.00916.88
8.0.70.0040.00416.64
8.0.60.0000.00816.71
8.0.50.0080.00016.81
8.0.30.0090.01016.92
8.0.20.0080.01517.40
8.0.10.0000.00716.98
8.0.00.0070.01016.68
7.4.330.0020.00215.00
7.4.320.0050.00216.39
7.4.300.0000.00616.50
7.4.290.0000.00716.43
7.4.280.0030.00616.44
7.4.270.0030.00316.50
7.4.260.0040.00316.48
7.4.250.0000.00816.51
7.4.240.0050.00216.55
7.4.230.0030.00316.38
7.4.220.0110.01516.47
7.4.210.0070.00716.45
7.4.200.0030.00316.19
7.4.190.0000.00716.40
7.4.160.0050.01116.43
7.4.150.0070.01017.40
7.4.140.0070.01017.86
7.4.130.0100.00716.60
7.4.120.0080.01016.41
7.4.110.0070.01116.38
7.4.100.0170.01016.53
7.4.90.0100.00716.64
7.4.80.0040.01716.48
7.4.70.0110.01116.34
7.4.60.0030.01216.34
7.4.50.0060.00316.36
7.4.40.0030.01022.77
7.4.30.0040.01416.60
7.4.00.0110.00615.13
7.3.330.0050.00013.10
7.3.320.0060.00013.08
7.3.310.0050.00316.21
7.3.300.0040.00416.10
7.3.290.0060.01216.19
7.3.280.0090.00816.18
7.3.270.0110.00717.40
7.3.260.0140.00916.50
7.3.250.0090.01116.31
7.3.240.0130.00716.30
7.3.230.0030.01316.39
7.3.210.0130.00316.40
7.3.200.0120.00819.39
7.3.190.0340.02716.27
7.3.180.0080.00816.32
7.3.170.0180.00416.36
7.3.160.0100.00616.25
7.3.120.0060.00914.58
7.3.110.0080.01114.70
7.3.100.0110.00814.84
7.3.90.0030.00914.73
7.3.80.0030.01014.60
7.3.70.0060.00314.61
7.3.60.0060.00614.73
7.3.50.0030.00714.52
7.3.40.0070.00714.76
7.3.30.0000.01114.79
7.3.20.0080.00316.51
7.3.10.0090.00016.54
7.3.00.0030.01016.71
7.2.330.0080.00816.29
7.2.320.0100.00616.44
7.2.310.0130.00616.47
7.2.300.0100.00716.34
7.2.290.0030.01316.34
7.2.250.0170.00014.90
7.2.240.0090.00914.66
7.2.230.0060.00914.83
7.2.220.0140.00314.84
7.2.210.0100.00314.83
7.2.200.0070.01114.92
7.2.190.0060.00914.70
7.2.180.0060.01014.98
7.2.170.0000.01514.93
7.2.160.0030.01415.02
7.2.150.0060.00916.90
7.2.140.0030.01016.39
7.2.130.0060.00316.61
7.2.120.0090.00616.66
7.2.110.0100.00716.73
7.2.100.0060.00916.68
7.2.90.0000.01516.73
7.2.80.0070.00716.79
7.2.70.0030.00716.96
7.2.60.0000.01216.48
7.2.50.0030.01316.90
7.2.40.0060.00916.74
7.2.30.0110.00616.79
7.2.20.0000.01416.60
7.2.10.0100.00316.48
7.2.00.0060.00616.45
7.1.330.0090.00915.63
7.1.320.0060.01215.62
7.1.310.0080.00015.70
7.1.300.0070.00715.51
7.1.290.0070.00715.75
7.1.280.0060.00815.67
7.1.270.0050.00515.66
7.1.260.0060.00315.57
7.1.250.0090.00615.57
7.1.240.0070.01015.55
7.1.230.0100.00615.53
7.1.220.0030.00715.51
7.1.210.0070.00715.60
7.1.200.0000.01315.29
7.1.190.0000.01015.52
7.1.180.0100.00615.61
7.1.170.0080.00815.71
7.1.160.0070.00715.47
7.1.150.0080.00315.74
7.1.140.0030.01015.33
7.1.130.0110.00415.47
7.1.120.0030.01015.65
7.1.110.0080.00015.66
7.1.100.0070.00715.77
7.1.90.0040.00715.72
7.1.80.0070.00715.37
7.1.70.0000.01415.42
7.1.60.0060.00615.60
7.1.50.0030.00615.60
7.1.40.0060.00615.83
7.1.30.0090.00615.61
7.1.20.0000.01215.30
7.1.10.0070.00715.56
7.1.00.0040.00815.63
7.0.330.0040.00715.35
7.0.320.0040.00415.21
7.0.310.0040.00715.10
7.0.300.0030.00614.91
7.0.290.0030.01015.34
7.0.280.0080.00415.31
7.0.270.0060.00915.04
7.0.260.0040.01015.13
7.0.250.0040.00414.90
7.0.240.0030.01015.23
7.0.230.0040.00415.30
7.0.220.0090.00015.23
7.0.210.0100.00315.42
7.0.200.0030.01215.48
7.0.190.0030.01214.95
7.0.180.0030.00615.21
7.0.170.0040.00415.16
7.0.160.0060.00615.29
7.0.150.0070.00415.12
7.0.140.0070.00715.06
7.0.130.0080.00314.95
7.0.120.0030.00915.36
7.0.110.0070.00315.46
7.0.100.0090.00415.35
7.0.90.0080.00415.15
7.0.80.0100.00315.12
7.0.70.0060.00615.32
7.0.60.0030.01415.00
7.0.50.0030.00515.20
7.0.40.0060.00313.42
7.0.30.0040.00713.51
7.0.20.0040.01212.96
7.0.10.0060.00313.24
7.0.00.0030.00613.45
5.6.400.0080.00414.18
5.6.390.0070.01014.02
5.6.380.0040.00714.24
5.6.370.0080.00414.09
5.6.360.0060.00914.18
5.6.350.0030.01314.25
5.6.340.0110.00414.43
5.6.330.0100.00714.39
5.6.320.0110.00014.13
5.6.310.0040.01114.29
5.6.300.0000.00813.86
5.6.290.0080.00013.86
5.6.280.0080.00814.26
5.6.270.0110.00314.11
5.6.260.0080.00614.32
5.6.250.0000.01314.13
5.6.240.0040.00714.12
5.6.230.0050.00314.10
5.6.220.0100.00714.04
5.6.210.0000.01113.82
5.6.200.0060.00614.43
5.6.190.0000.01414.12
5.6.180.0110.00414.12
5.6.170.0060.01214.14
5.6.160.0030.00813.83
5.6.150.0000.01113.75
5.6.140.0000.01314.01
5.6.130.0030.01314.02
5.6.120.0000.01113.89
5.6.110.0090.00614.18
5.6.100.0030.01314.28
5.6.90.0000.01514.06
5.6.80.0030.01013.82
5.6.70.0090.00314.25
5.6.60.0110.00313.98
5.6.50.0070.00713.80
5.6.40.0100.00714.10
5.6.30.0070.00713.93
5.6.20.0040.00413.73
5.6.10.0030.01114.23
5.6.00.0100.00313.98
5.5.380.0090.00314.09
5.5.370.0000.00913.95
5.5.360.0090.00913.85
5.5.350.0040.01113.73
5.5.340.0000.01114.11
5.5.330.0120.00614.14
5.5.320.0000.01413.80
5.5.310.0100.00314.12
5.5.300.0070.01013.67
5.5.290.0120.00313.69
5.5.280.0090.00914.14
5.5.270.0070.00714.05
5.5.260.0070.00713.93
5.5.250.0040.00414.06
5.5.240.0060.00913.74
5.5.230.0000.00913.94
5.5.220.0040.00713.75
5.5.210.0090.00313.69
5.5.200.0070.00313.77
5.5.190.0040.00414.12
5.5.180.0030.01013.86
5.5.170.0030.01013.70
5.5.160.0070.00413.83
5.5.150.0060.00614.13
5.5.140.0090.00914.19
5.5.130.0090.00614.12
5.5.120.0080.00813.79
5.5.110.0070.00314.04
5.5.100.0080.00513.76
5.5.90.0000.00814.05
5.5.80.0030.01013.98
5.5.70.0000.01513.76
5.5.60.0030.00913.73
5.5.50.0070.00714.00
5.5.40.0070.00713.55
5.5.30.0030.00913.50
5.5.20.0030.01013.92
5.5.10.0060.00613.74
5.5.00.0050.00513.63
5.4.450.0040.00412.72
5.4.440.0000.01412.72
5.4.430.0030.00912.72
5.4.420.0040.00712.72
5.4.410.0060.00612.72
5.4.400.0050.00512.72
5.4.390.0030.00512.72
5.4.380.0030.00812.72
5.4.370.0050.00512.72
5.4.360.0030.01012.72
5.4.350.0050.00212.72
5.4.340.0030.00912.72
5.4.330.0060.00612.72
5.4.320.0030.00712.72
5.4.310.0000.01012.72
5.4.300.0080.00412.72
5.4.290.0030.01012.72
5.4.280.0040.00712.72
5.4.270.0000.01212.72
5.4.260.0130.00012.72
5.4.250.0000.01112.72
5.4.240.0000.00712.72
5.4.230.0040.00412.72
5.4.220.0060.00012.72
5.4.210.0070.00312.72
5.4.200.0060.00612.72
5.4.190.0130.02512.55
5.4.180.0100.02712.55
5.4.170.0130.03912.56
5.4.160.0100.02312.56
5.4.150.0090.02712.55
5.4.140.0110.02412.39
5.4.130.0190.03112.39
5.4.120.0130.02112.37
5.4.110.0090.02412.37
5.4.100.0080.02612.37
5.4.90.0070.02512.37
5.4.80.0100.02412.37
5.4.70.0080.02412.37
5.4.60.0090.02412.36
5.4.50.0090.02512.36
5.4.40.0100.02312.36
5.4.30.0050.03012.36
5.4.20.0120.02512.36
5.4.10.0070.02412.36
5.4.00.0090.02512.10
5.3.290.0000.01012.72
5.3.280.0000.00612.72
5.3.270.0110.02512.72
5.3.260.0090.02512.72
5.3.250.0070.02612.72
5.3.240.0110.02112.72
5.3.230.0080.02812.71
5.3.220.0090.02612.70
5.3.210.0100.02612.70
5.3.200.0150.03412.70
5.3.190.0050.02812.70
5.3.180.0090.02512.70
5.3.170.0090.02412.70
5.3.160.0100.02412.70
5.3.150.0070.02512.70
5.3.140.0100.02312.69
5.3.130.0110.02412.69
5.3.120.0090.02312.69
5.3.110.0110.02412.69
5.3.100.0120.03912.42
5.3.90.0080.02612.41
5.3.80.0090.02512.40
5.3.70.0110.02412.40
5.3.60.0100.02512.39
5.3.50.0100.02312.37
5.3.40.0170.03312.37
5.3.30.0090.02312.36
5.3.20.0100.02312.24
5.3.10.0090.02512.22
5.3.00.0130.03512.21

preferences:
41.55 ms | 401 KiB | 5 Q