3v4l.org

run code in 300+ PHP versions simultaneously
<?php use B\D, C\E as F; namespace A ; declare(ticks=1); function tick_handler() { echo "tick_handler() called\n"; } 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.70.0100.01018.31
8.3.60.0160.00016.50
8.3.50.0130.00718.23
8.3.40.0090.00618.54
8.3.30.0040.01118.42
8.3.20.0030.00618.52
8.3.10.0080.00018.52
8.3.00.0040.00419.25
8.2.180.0160.00016.63
8.2.170.0180.00322.96
8.2.160.0060.00918.70
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0070.00020.69
8.2.110.0100.00319.24
8.2.100.0110.00017.97
8.2.90.0060.00319.05
8.2.80.0030.00517.97
8.2.70.0000.00917.38
8.2.60.0040.00417.80
8.2.50.0070.00018.10
8.2.40.0070.00020.60
8.2.30.0000.00719.11
8.2.20.0110.00017.48
8.2.10.0000.00717.50
8.2.00.0050.00317.45
8.1.280.0060.00925.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0000.00920.87
8.1.230.0070.00420.31
8.1.220.0050.00317.74
8.1.210.0030.00518.77
8.1.200.0040.00717.23
8.1.190.0080.00017.10
8.1.180.0030.00618.10
8.1.170.0030.00518.46
8.1.160.0000.00718.75
8.1.150.0040.00419.98
8.1.140.0020.00517.17
8.1.130.0000.00717.36
8.1.120.0050.00217.23
8.1.110.0030.00517.21
8.1.100.0000.00717.27
8.1.90.0080.00017.25
8.1.80.0070.00017.36
8.1.70.0000.00717.31
8.1.60.0050.00317.35
8.1.50.0050.00317.34
8.1.40.0000.00817.29
8.1.30.0030.00617.47
8.1.20.0040.00417.51
8.1.10.0030.00617.31
8.1.00.0050.00217.16
8.0.300.0000.00818.78
8.0.290.0000.00916.58
8.0.280.0000.00718.25
8.0.270.0030.00317.07
8.0.260.0000.00716.73
8.0.250.0000.00716.75
8.0.240.0040.00416.86
8.0.230.0090.00016.86
8.0.220.0030.00316.85
8.0.210.0070.00016.82
8.0.200.0000.00716.76
8.0.190.0040.00316.81
8.0.180.0040.00416.89
8.0.170.0030.00616.75
8.0.160.0030.00416.84
8.0.150.0020.00516.75
8.0.140.0030.00516.73
8.0.130.0030.00313.25
8.0.120.0060.00616.78
8.0.110.0040.00416.75
8.0.100.0000.00816.87
8.0.90.0050.00316.68
8.0.80.0040.01116.85
8.0.70.0040.00416.64
8.0.60.0040.00416.60
8.0.50.0040.00416.78
8.0.30.0110.00717.18
8.0.20.0110.00817.00
8.0.10.0000.00716.82
8.0.00.0100.01116.61
7.4.330.0000.00512.94
7.4.320.0030.00316.53
7.4.300.0060.00016.55
7.4.290.0000.00716.47
7.4.280.0030.00616.47
7.4.270.0070.00016.45
7.4.260.0030.00313.23
7.4.250.0040.00416.48
7.4.240.0000.00816.40
7.4.230.0030.00316.50
7.4.220.0090.00616.48
7.4.210.0200.00016.64
7.4.200.0000.00716.55
7.4.190.0060.00316.61
7.4.160.0060.00916.18
7.4.150.0110.01116.86
7.4.140.0130.00316.41
7.4.130.0070.01016.78
7.4.120.0110.00516.77
7.4.110.0120.00616.53
7.4.100.0110.00516.53
7.4.90.0070.01616.48
7.4.80.0130.00916.48
7.4.70.0110.00616.37
7.4.60.0130.00316.33
7.4.50.0120.00016.25
7.4.40.0110.00816.27
7.4.30.0060.01216.60
7.4.00.0060.01015.01
7.3.330.0030.00313.39
7.3.320.0030.00313.16
7.3.310.0040.00416.20
7.3.300.0070.00016.29
7.3.290.0080.00516.31
7.3.280.0100.00816.27
7.3.270.0080.00816.29
7.3.260.0130.00416.46
7.3.250.0130.00716.47
7.3.240.0120.00616.42
7.3.230.0090.00916.56
7.3.210.0150.00616.51
7.3.200.0060.01619.39
7.3.190.0050.01116.28
7.3.180.0100.00616.48
7.3.170.0090.00916.65
7.3.160.0040.01316.49
7.3.120.0110.00614.70
7.3.110.0070.01014.90
7.3.100.0000.01714.92
7.3.90.0090.00614.63
7.3.80.0060.00614.46
7.3.70.0070.00714.45
7.3.60.0090.00614.61
7.3.50.0000.01414.62
7.3.40.0040.00814.77
7.3.30.0000.01114.57
7.3.20.0080.00416.69
7.3.10.0070.00516.52
7.3.00.0040.00816.54
7.2.330.0060.01116.69
7.2.320.0100.00716.69
7.2.310.0120.00616.65
7.2.300.0120.01216.25
7.2.290.0140.00416.64
7.2.250.0040.01514.62
7.2.240.0000.02114.75
7.2.230.0030.01414.87
7.2.220.0060.00315.04
7.2.210.0040.00815.13
7.2.200.0060.00614.71
7.2.190.0060.00314.84
7.2.180.0040.00814.85
7.2.170.0090.00914.86
7.2.130.0040.01016.62
7.2.120.0080.00616.58
7.2.110.0040.01116.68
7.2.100.0070.00816.75
7.2.90.0080.00616.60
7.2.80.0100.00416.68
7.2.70.0080.00716.72
7.2.60.0030.01016.82
7.2.50.0060.00716.82
7.2.40.0050.00816.79
7.2.30.0040.00816.74
7.2.20.0080.00716.72
7.2.10.0070.00416.74
7.2.00.0070.00817.36
7.1.330.0140.00015.48
7.1.320.0070.00315.50
7.1.310.0080.00315.65
7.1.300.0040.00715.52
7.1.290.0060.00315.33
7.1.280.0030.01015.38
7.1.270.0060.00615.37
7.1.260.0070.01015.56
7.1.250.0060.00515.63
7.1.240.0040.01115.64
7.1.230.0000.01615.80
7.1.220.0000.01215.64
7.1.210.0000.00915.48
7.1.200.0020.01115.62
7.1.190.0090.00615.81
7.1.180.0040.00815.61
7.1.170.0000.00915.34
7.1.160.0040.00715.70
7.1.150.0090.00615.65
7.1.140.0060.00315.75
7.1.130.0000.01115.67
7.1.120.0060.00615.51
7.1.110.0060.00615.45
7.1.100.0030.00816.88
7.1.90.0090.00315.61
7.1.80.0030.00915.42
7.1.70.0030.00816.42
7.1.60.0090.00717.33
7.1.50.0070.01116.05
7.1.40.0000.01215.60
7.1.30.0030.00515.63
7.1.20.0060.00615.42
7.1.10.0030.01015.40
7.1.00.0040.02719.07
7.0.330.0030.01015.32
7.0.320.0030.00615.39
7.0.310.0130.00015.30
7.0.300.0060.00615.35
7.0.290.0110.00015.36
7.0.280.0000.00915.25
7.0.270.0060.00915.36
7.0.260.0100.00315.14
7.0.250.0070.00315.48
7.0.240.0060.00315.44
7.0.230.0030.00615.41
7.0.220.0000.01315.52
7.0.210.0060.00315.34
7.0.200.0070.00716.06
7.0.190.0030.00615.23
7.0.180.0040.00415.32
7.0.170.0060.00615.26
7.0.160.0030.00515.29
7.0.150.0060.00615.39
7.0.140.0050.03518.66
7.0.130.0080.00615.29
7.0.120.0090.03218.76
7.0.110.0060.00615.40
7.0.100.0060.00315.39
7.0.90.0070.00715.29
7.0.80.0070.00315.41
7.0.70.0000.01115.35
7.0.60.0090.03317.63
7.0.50.0110.03816.62
7.0.40.0060.03116.76
7.0.30.0030.04616.64
7.0.20.0080.04316.86
7.0.10.0070.03316.71
7.0.00.0060.03116.80
5.6.380.0030.01013.84
5.6.370.0060.00314.06
5.6.360.0040.00414.18
5.6.350.0000.01013.86
5.6.340.0100.00314.11
5.6.330.0000.01414.14
5.6.320.0060.01014.02
5.6.310.0030.00614.28
5.6.300.0030.01014.48
5.6.290.0000.00913.92
5.6.280.0030.03817.56
5.6.270.0050.00514.29
5.6.260.0100.00313.94
5.6.250.0040.01114.10
5.6.240.0030.00914.31
5.6.230.0050.00514.25
5.6.220.0000.00914.11
5.6.210.0080.02217.29
5.6.200.0030.03716.29
5.6.190.0050.03517.43
5.6.180.0070.04517.47
5.6.170.0030.03617.50
5.6.160.0020.04517.41
5.6.150.0050.02917.18
5.6.140.0060.03017.33
5.6.130.0050.02317.26
5.6.120.0020.05017.34
5.6.110.0100.04417.26
5.6.100.0030.02417.35
5.6.90.0070.03217.13
5.6.80.0100.03216.95
5.6.70.0050.02616.96
5.6.60.0050.03616.81
5.6.50.0070.04316.87
5.6.40.0050.03516.91
5.6.30.0070.02116.90
5.6.20.0080.04117.00
5.6.10.0130.04016.93
5.6.00.0080.03016.97
5.5.380.0000.00611.06
5.5.370.0120.00011.15
5.5.360.0030.00310.94
5.5.350.0100.03715.70
5.5.340.0050.04514.35
5.5.330.0020.03215.48
5.5.320.0050.02615.73
5.5.310.0100.04215.88
5.5.300.0100.04015.56
5.5.290.0080.02015.59
5.5.280.0060.02315.58
5.5.270.0050.04615.65
5.5.260.0070.03715.71
5.5.250.0110.02815.49
5.5.240.0070.03715.11
5.5.230.0060.02715.25
5.5.220.0020.02615.25
5.5.210.0130.03615.11
5.5.200.0050.02515.33
5.5.190.0100.01815.20
5.5.180.0050.04015.18
5.5.170.0030.00310.91
5.5.160.0080.03815.25
5.5.150.0040.02215.27
5.5.140.0070.03115.03
5.5.130.0080.04115.22
5.5.120.0090.03815.26
5.5.110.0050.03115.25
5.5.100.0050.03515.33
5.5.90.0070.04115.16
5.5.80.0050.03915.19
5.5.70.0080.02615.13
5.5.60.0070.02315.06
5.5.50.0070.02315.27
5.5.40.0050.04415.29
5.5.30.0070.03915.09
5.5.20.0030.03914.98
5.5.10.0050.02815.06
5.5.00.0080.04315.22
5.4.450.0070.03315.27
5.4.440.0050.03714.94
5.4.430.0070.04015.07
5.4.420.0020.04215.27
5.4.410.0030.02214.99
5.4.400.0120.03314.73
5.4.390.0020.03814.95
5.4.380.0030.02115.03
5.4.370.0070.03914.83
5.4.360.0000.03715.04
5.4.350.0050.02215.12
5.4.340.0050.02815.01
5.4.330.0060.00611.03
5.4.320.0070.02714.98
5.4.310.0050.02215.03
5.4.300.0140.03215.07
5.4.290.0050.04014.93
5.4.280.0100.03514.80
5.4.270.0110.03415.18
5.4.260.0080.04515.13
5.4.250.0050.04115.06
5.4.240.0050.03515.00
5.4.230.0100.03614.96
5.4.220.0030.04415.08
5.4.210.0010.02815.15
5.4.200.0050.02214.94
5.4.190.0090.03014.98
5.4.180.0050.03615.05
5.4.170.0070.04314.92
5.4.160.0080.02015.02
5.4.150.0120.03614.90
5.4.140.0070.03613.73
5.4.130.0040.02413.71
5.4.120.0000.04213.71
5.4.110.0000.02713.83
5.4.100.0070.03213.84
5.4.90.0050.03713.81
5.4.80.0080.02813.75
5.4.70.0070.03713.72
5.4.60.0060.02013.66
5.4.50.0070.02813.53
5.4.40.0030.02313.66
5.4.30.0080.04013.50
5.4.20.0050.04013.68
5.4.10.0060.02713.74
5.4.00.0030.02313.41
5.3.290.0020.02612.63
5.3.280.0030.04312.58
5.3.270.0060.04112.62
5.3.260.0030.03912.52
5.3.250.0080.03812.65
5.3.240.0020.03512.57
5.3.230.0060.03812.50
5.3.220.0030.03812.47
5.3.210.0060.02112.41
5.3.200.0030.02412.46
5.3.190.0080.03312.33
5.3.180.0080.03512.52
5.3.170.0030.04212.58
5.3.160.0070.03712.57
5.3.150.0030.02412.45
5.3.140.0050.04012.50
5.3.130.0050.04312.49
5.3.120.0000.03112.44
5.3.110.0080.03812.40
5.3.100.0030.02412.24
5.3.90.0030.04012.21
5.3.80.0030.03812.04
5.3.70.0090.02812.19
5.3.60.0040.03312.22
5.3.50.0080.02312.02
5.3.40.0050.02012.19
5.3.30.0040.02112.19
5.3.20.0030.02011.98
5.3.10.0070.01711.90
5.3.00.0030.02011.91
5.2.170.0030.02310.74
5.2.160.0050.02610.61
5.2.150.0020.01710.63
5.2.140.0030.01610.60
5.2.130.0040.01310.63
5.2.120.0020.01910.63
5.2.110.0030.01610.61
5.2.100.0020.01510.59
5.2.90.0020.01710.61
5.2.80.0020.01810.60
5.2.70.0020.01710.56
5.2.60.0020.01810.60
5.2.50.0020.01710.56
5.2.40.0020.01810.66
5.2.30.0010.02310.52
5.2.20.0000.01810.54
5.2.10.0030.01810.46
5.2.00.0040.01510.44
5.1.60.0020.01410.05
5.1.50.0030.01410.08
5.1.40.0000.01610.08
5.1.30.0020.01510.20
5.1.20.0010.01610.19
5.1.10.0070.01010.15
5.1.00.0050.01710.14
5.0.50.0020.0119.39
5.0.40.0020.0129.32
5.0.30.0040.0169.27
5.0.20.0050.0119.13
5.0.10.0010.0119.15
5.0.00.0000.0179.12
4.4.90.0000.0108.76
4.4.80.0000.0108.76
4.4.70.0010.0108.76
4.4.60.0030.0088.76
4.4.50.0020.0098.76
4.4.40.0000.0148.76
4.4.30.0020.0088.76
4.4.20.0030.0088.76
4.4.10.0030.0108.76
4.4.00.0020.0138.76
4.3.110.0040.0078.76
4.3.100.0030.0088.76
4.3.90.0000.0118.76
4.3.80.0030.0128.76
4.3.70.0000.0108.76
4.3.60.0020.0088.76
4.3.50.0010.0088.76
4.3.40.0020.0138.76
4.3.30.0000.0108.76
4.3.20.0010.0088.76
4.3.10.0020.0108.76
4.3.00.0020.0108.76

preferences:
40.82 ms | 401 KiB | 5 Q