3v4l.org

run code in 300+ PHP versions simultaneously
<?php // File "load.php". namespace Foo\Bar { class load { static public function arithmetic() { require_once __DIR__ . '/arithmetic.php'; } } } // File "arithmetic.php". namespace Foo\Bar\Functions { function add($a, $b) { return $a + $b; } const add = 'Foo\Bar\Functions\add'; } // User app. namespace Some\App { use Foo\Bar\load; use Foo\Bar\Functions as f; //load::arithmetic(); <-- commented out only for this demo (cause we have no real file) echo f\add(5, 6); // 11 $callable = f\add; echo $callable(5, 6); // 11 }

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.0030.01016.38
8.3.50.0080.00822.00
8.3.40.0090.01218.79
8.3.30.0100.00319.09
8.3.20.0080.00020.22
8.3.10.0080.00021.78
8.3.00.0060.00319.38
8.2.180.0070.01418.41
8.2.170.0090.00622.96
8.2.160.0100.00320.22
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.41
8.2.110.0090.00019.37
8.2.100.0080.00417.63
8.2.90.0030.00519.17
8.2.80.0040.00417.97
8.2.70.0040.00417.63
8.2.60.0080.00017.80
8.2.50.0060.00318.07
8.2.40.0050.00319.88
8.2.30.0030.00518.12
8.2.20.0040.00417.59
8.2.10.0070.00018.09
8.2.00.0040.00417.68
8.1.280.0140.00725.92
8.1.270.0050.00520.49
8.1.260.0050.00226.35
8.1.250.0030.00528.09
8.1.240.0060.00323.92
8.1.230.0110.00018.79
8.1.220.0030.00517.77
8.1.210.0000.00918.77
8.1.200.0000.00817.23
8.1.190.0030.00517.00
8.1.180.0050.00318.10
8.1.170.0090.00020.28
8.1.160.0040.00422.01
8.1.150.0040.00418.88
8.1.140.0000.00717.44
8.1.130.0000.00817.72
8.1.120.0040.00417.44
8.1.110.0040.00417.49
8.1.100.0000.00717.39
8.1.90.0000.00717.44
8.1.80.0000.00717.38
8.1.70.0040.00417.32
8.1.60.0030.00617.56
8.1.50.0000.00817.39
8.1.40.0000.00817.54
8.1.30.0040.00417.66
8.1.20.0050.00317.55
8.1.10.0040.00417.41
8.1.00.0040.00417.54
8.0.300.0030.00318.77
8.0.290.0000.00916.75
8.0.280.0000.00718.44
8.0.270.0030.00317.21
8.0.260.0000.00617.24
8.0.250.0070.00016.88
8.0.240.0030.00316.86
8.0.230.0000.00716.82
8.0.220.0040.00416.92
8.0.210.0030.00316.84
8.0.200.0060.00016.93
8.0.190.0000.00717.01
8.0.180.0040.00416.91
8.0.170.0030.00516.92
8.0.160.0040.00416.94
8.0.150.0030.00316.89
8.0.140.0040.00416.86
8.0.130.0040.00413.27
8.0.120.0000.00816.86
8.0.110.0040.00416.84
8.0.100.0040.00416.94
8.0.90.0030.00516.76
8.0.80.0060.00916.91
8.0.70.0000.00816.91
8.0.60.0070.00016.86
8.0.50.0000.00716.72
8.0.30.0130.00617.00
8.0.20.0180.01617.43
8.0.10.0000.00816.95
8.0.00.0130.00516.80
7.4.330.0050.00015.03
7.4.320.0030.00316.57
7.4.300.0040.00416.57
7.4.290.0000.00716.56
7.4.280.0050.00316.59
7.4.270.0040.00416.48
7.4.260.0000.00716.48
7.4.250.0000.00816.56
7.4.240.0000.00816.40
7.4.230.0000.00716.38
7.4.220.0150.00316.63
7.4.210.0060.00916.69
7.4.200.0040.00416.61
7.4.160.0150.00616.43
7.4.150.0150.00317.40
7.4.140.0080.01117.86
7.4.130.0100.00916.51
7.4.120.0100.00916.65
7.4.110.0080.01116.68
7.4.100.0000.01716.59
7.4.90.0110.01116.64
7.4.80.0170.00319.39
7.4.70.0100.00616.57
7.4.60.0160.00016.39
7.4.50.0060.00016.57
7.4.40.0060.01016.33
7.4.30.0070.01116.46
7.4.00.0070.01014.75
7.3.330.0050.00013.27
7.3.320.0070.00713.24
7.3.310.0030.00316.34
7.3.300.0030.00316.27
7.3.290.0100.00416.28
7.3.280.0100.00816.30
7.3.270.0100.00717.40
7.3.260.0140.00316.61
7.3.250.0100.00716.47
7.3.240.0100.00716.34
7.3.230.0120.00616.51
7.3.210.0090.00916.26
7.3.200.0110.01119.39
7.3.190.0060.00916.46
7.3.180.0060.00916.42
7.3.170.0110.00916.60
7.3.160.0100.00616.36
7.2.330.0070.01116.86
7.2.320.0120.00416.31
7.2.310.0100.01816.54
7.2.300.0140.00316.38
7.2.290.0030.02016.44
7.2.00.0040.01119.13
7.1.100.0090.00618.21
7.1.70.0040.00416.80
7.1.60.0100.01319.50
7.1.50.0000.01516.57
7.1.00.0030.07722.51
7.0.200.0270.01014.94
7.0.140.0000.07722.09
7.0.60.0070.06020.02
7.0.50.0030.05017.83
7.0.40.0100.07320.14
7.0.30.0300.07320.17
7.0.20.0270.07320.16
7.0.10.0130.08020.09
7.0.00.0070.08720.11
5.6.210.0100.04020.68
5.6.200.0070.08018.29
5.6.190.0170.08020.52
5.6.180.0430.07020.61
5.6.170.0200.04320.55
5.6.160.0100.08320.55
5.6.150.0000.04318.14
5.6.140.0100.06318.18
5.6.130.0030.04018.18
5.6.120.0030.09321.00
5.6.110.0030.09021.14
5.6.100.0200.06721.09
5.6.90.0030.05321.11
5.6.80.0000.04320.41
5.5.350.4030.04020.36
5.5.340.0130.07717.99
5.5.330.0070.07020.27
5.5.320.0030.04020.30
5.5.310.0270.05320.32
5.5.300.0000.04718.00
5.5.290.0070.07018.03
5.5.280.0200.07720.85
5.5.270.0070.05320.75
5.5.260.0100.08020.88
5.5.250.0130.07720.70
5.5.240.0170.08020.25
5.4.450.4330.04719.48
5.4.440.3570.04719.55
5.4.430.4130.04319.17
5.4.420.3730.04019.31
5.4.410.4000.03319.36
5.4.400.4070.03019.16
5.4.390.4200.04019.24
5.4.380.4270.03319.20
5.4.370.4200.04319.14
5.4.360.4300.03718.89
5.4.350.4300.04719.22
5.4.340.0030.08019.24
5.4.320.4700.03718.99
5.4.310.4300.03719.15
5.4.300.3900.04019.14
5.4.290.3670.03718.85
5.4.280.3730.04019.13
5.4.270.3630.04019.31
5.4.260.3630.03319.14
5.4.250.3530.04318.99
5.4.240.0000.04019.08
5.4.230.0130.07719.05
5.4.220.3030.03319.19
5.4.210.2100.03719.31
5.4.200.2670.03319.19
5.4.190.3470.04018.84
5.4.180.3600.03718.93
5.4.170.3530.03319.07
5.4.160.3570.04019.11
5.4.150.3400.03719.20
5.4.140.3170.04016.36
5.4.130.3100.03016.46
5.4.120.3500.03716.46
5.4.110.4230.04016.61
5.4.100.4300.03716.31
5.4.90.4130.03716.61
5.4.80.4170.03716.39
5.4.70.3970.03716.41
5.4.60.3900.04016.27
5.4.50.3600.03716.23
5.4.40.3530.03316.53
5.4.30.3600.03716.47
5.4.20.4300.03716.41
5.4.10.4370.03316.55
5.4.00.4030.03015.95
5.3.290.4170.04014.68
5.3.280.4000.04014.61
5.3.270.2930.03714.69
5.3.260.3770.04014.60
5.3.250.3200.03714.76
5.3.240.2700.04314.62
5.3.230.3200.03714.50
5.3.220.3670.03714.57
5.3.210.3970.02714.68
5.3.200.4300.04014.53
5.3.190.4100.04014.54
5.3.180.4400.03714.55
5.3.170.4030.04014.48
5.3.160.3600.02714.79
5.3.150.3530.04014.79
5.3.140.3670.03714.41
5.3.130.3500.03714.47
5.3.120.3700.04014.77
5.3.110.4170.03714.46
5.3.100.4030.03014.04
5.3.90.3600.03014.04
5.3.80.4030.03014.18
5.3.70.4170.03314.02
5.3.60.4300.03714.02
5.3.50.5100.02714.00
5.3.40.4570.03313.86
5.3.30.3970.04014.02
5.3.20.3700.03713.61
5.3.10.4100.03713.57
5.3.00.3870.04013.86
5.2.170.3600.03310.99
5.2.160.3070.03311.29
5.2.150.3400.02711.05
5.2.140.3270.02011.30
5.2.130.3370.03010.96
5.2.120.3430.02311.04
5.2.110.3100.02711.11
5.2.100.2900.02311.04
5.2.90.3200.03010.95
5.2.80.3100.03710.93
5.2.70.3030.03011.20
5.2.60.3030.02710.90
5.2.50.3230.03011.11
5.2.40.2470.02711.14
5.2.30.2170.03310.88
5.2.20.2230.02711.05
5.2.10.2470.03011.01
5.2.00.2370.03010.87
5.1.60.2430.0209.90
5.1.50.2700.0309.93
5.1.40.2270.02310.05
5.1.30.2870.02310.24
5.1.20.2900.02310.42
5.1.10.2300.02310.19
5.1.00.2470.03010.11
5.0.50.1130.0208.95
5.0.40.1400.0208.95
5.0.30.1470.0308.95
5.0.20.1370.0178.95
5.0.10.1800.0178.95
5.0.00.1530.0308.95
4.4.90.1230.0138.95
4.4.80.1170.0138.95
4.4.70.1270.0208.95
4.4.60.1000.0178.95
4.4.50.1230.0108.95
4.4.40.1230.0278.95
4.4.30.1170.0138.95
4.4.20.1200.0178.95
4.4.10.1530.0208.95
4.4.00.1530.0308.95
4.3.110.1430.0138.95
4.3.100.1400.0178.95
4.3.90.1500.0178.95
4.3.80.1770.0208.95
4.3.70.1800.0178.95
4.3.60.1630.0138.95
4.3.50.1770.0108.95
4.3.40.1770.0238.95
4.3.30.0800.0178.95
4.3.20.0900.0208.95
4.3.10.0970.0208.95
4.3.00.0970.0208.95

preferences:
41.64 ms | 401 KiB | 5 Q