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(); echo f\add(5, 6) . "\n"; // 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.0090.00616.61
8.3.50.0110.00718.04
8.3.40.0120.00318.75
8.3.30.0040.01119.04
8.3.20.0040.00420.32
8.3.10.0080.00021.91
8.3.00.0080.00019.50
8.2.180.0150.00916.75
8.2.170.0140.00322.96
8.2.160.0150.00622.26
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0060.00319.66
8.2.110.0100.00019.22
8.2.100.0050.00517.88
8.2.90.0080.00019.21
8.2.80.0040.00417.97
8.2.70.0030.00617.75
8.2.60.0050.00318.04
8.2.50.0030.00518.07
8.2.40.0050.00320.00
8.2.30.0000.00817.95
8.2.20.0040.00417.63
8.2.10.0000.00718.13
8.2.00.0030.00617.63
8.1.280.0070.01425.92
8.1.270.0060.01018.78
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0090.00022.25
8.1.230.0110.00017.42
8.1.220.0050.00317.77
8.1.210.0060.00318.77
8.1.200.0060.00317.25
8.1.190.0030.00617.13
8.1.180.0060.00318.10
8.1.170.0040.00420.33
8.1.160.0000.00722.07
8.1.150.0000.00718.75
8.1.140.0000.00717.27
8.1.130.0030.00317.70
8.1.120.0040.00417.31
8.1.110.0040.00417.34
8.1.100.0030.00517.41
8.1.90.0070.00017.30
8.1.80.0040.00417.30
8.1.70.0040.00417.43
8.1.60.0000.00817.57
8.1.50.0030.00517.42
8.1.40.0030.00517.54
8.1.30.0000.00917.62
8.1.20.0080.00017.60
8.1.10.0030.00517.46
8.1.00.0050.00317.38
8.0.300.0040.00418.77
8.0.290.0070.00016.88
8.0.280.0000.00718.52
8.0.270.0050.00317.32
8.0.260.0060.00017.24
8.0.250.0000.00717.11
8.0.240.0070.00017.08
8.0.230.0030.00317.12
8.0.220.0030.00316.92
8.0.210.0070.00016.90
8.0.200.0000.00817.12
8.0.190.0030.00517.11
8.0.180.0050.00317.04
8.0.170.0020.00517.07
8.0.160.0080.00016.96
8.0.150.0040.00416.98
8.0.140.0000.00816.96
8.0.130.0070.00013.47
8.0.120.0040.00416.98
8.0.110.0000.00816.96
8.0.100.0050.00216.89
8.0.90.0080.00016.94
8.0.80.0090.01017.05
8.0.70.0030.00516.92
8.0.60.0050.00217.08
8.0.50.0040.00417.01
8.0.30.0170.00317.18
8.0.20.0200.01717.40
8.0.10.0040.00416.91
8.0.00.0130.01016.83
7.4.330.0050.00015.15
7.4.320.0060.00016.41
7.4.300.0030.00316.53
7.4.290.0030.00516.52
7.4.280.0000.00816.52
7.4.270.0000.00816.47
7.4.260.0030.00316.52
7.4.250.0080.00016.34
7.4.240.0040.00416.61
7.4.230.0030.00316.45
7.4.220.0090.00916.48
7.4.210.0080.00616.62
7.4.200.0050.00216.71
7.4.160.0080.00816.66
7.4.150.0150.00317.40
7.4.140.0110.00717.86
7.4.130.0100.00716.64
7.4.120.0080.01016.48
7.4.110.0070.01516.51
7.4.100.0110.00716.55
7.4.90.0070.01116.52
7.4.80.0030.01319.39
7.4.70.0000.01716.57
7.4.60.0060.01116.46
7.4.50.0060.00316.26
7.4.40.0140.00316.31
7.4.30.0090.01316.38
7.4.00.0130.00314.87
7.3.330.0030.00313.51
7.3.320.0060.00613.21
7.3.310.0040.00416.28
7.3.300.0070.00016.41
7.3.290.0000.00616.32
7.3.280.0070.01016.49
7.3.270.0160.00317.40
7.3.260.0070.01416.55
7.3.250.0120.00516.38
7.3.240.0090.00616.39
7.3.230.0090.00916.51
7.3.210.0100.01316.33
7.3.200.0110.01119.39
7.3.190.0040.01216.48
7.3.180.0190.00716.64
7.3.170.0140.00716.36
7.3.160.0040.01216.45
7.2.330.0060.01216.46
7.2.320.0070.01016.48
7.2.310.0060.01216.65
7.2.300.0130.00316.79
7.2.290.0090.00916.80
7.2.00.0000.01419.29
7.1.100.0070.01118.11
7.1.70.0000.00717.23
7.1.60.0140.01119.50
7.1.50.0040.01116.87
7.1.00.0030.07722.34
7.0.200.0260.01016.70
7.0.140.0000.07721.95
7.0.60.0170.05020.02
7.0.50.0100.04717.86
7.0.40.0000.05720.29
7.0.30.0570.06320.27
7.0.20.0230.08320.23
7.0.10.0170.07720.21
7.0.00.0070.05320.26
5.6.280.0030.07321.05
5.6.210.0170.07020.51
5.6.200.0070.05318.20
5.6.190.0030.04320.61
5.6.180.2700.04720.48
5.6.170.0300.08020.53
5.6.160.0100.08020.52
5.6.150.0030.04018.24
5.6.140.0070.08018.18
5.6.130.0100.08018.19
5.6.120.0100.04020.99
5.6.110.0070.07721.14
5.6.100.0070.08321.01
5.6.90.0100.08721.11
5.6.80.0030.05720.41
5.5.350.4370.04320.43
5.5.340.0030.08017.95
5.5.330.0130.07720.44
5.5.320.0300.06020.32
5.5.310.0270.05020.38
5.5.300.0070.08017.99
5.5.290.0070.08018.09
5.5.280.0130.06320.79
5.5.270.0070.04020.89
5.5.260.0070.06720.97
5.5.250.0100.05720.57
5.5.240.0200.07720.35
5.4.450.0700.05319.16
5.4.440.0930.06019.61
5.4.430.0800.06019.57
5.4.420.0770.05319.55
5.4.410.0800.05319.04
5.4.400.1030.06018.77
5.4.390.0870.06718.57
5.4.380.1130.05318.48
5.4.370.1070.07318.79
5.4.360.1030.07018.86
5.4.350.1100.07018.77
5.4.340.1000.05718.62
5.4.320.1170.07018.76
5.4.310.1170.05718.73
5.4.300.1100.06018.73
5.4.290.1130.04718.81
5.4.280.0730.07018.46
5.4.270.0870.05318.47
5.4.260.0870.04718.74
5.4.250.0870.05718.69
5.4.240.0770.06018.84
5.4.230.0730.05018.50
5.4.220.1030.06018.78
5.4.210.0900.07018.71
5.4.200.0900.05716.64
5.4.190.0730.06018.84
5.4.180.0700.06718.51
5.4.170.1000.05018.77
5.4.160.0970.04718.78
5.4.150.0870.05318.45
5.4.140.0970.05716.48
5.4.130.1070.04716.29
5.4.120.0970.05716.38
5.4.110.1070.05316.37
5.4.100.1130.05716.20
5.4.90.1030.05016.34
5.4.80.1100.04716.27
5.4.70.1130.04716.26
5.4.60.1030.05316.43
5.4.50.1070.04716.23
5.4.40.0970.05716.19
5.4.30.1070.06016.27
5.4.20.0800.05316.20
5.4.10.0830.05016.38
5.4.00.0970.03715.65
5.3.290.0830.05314.65
5.3.280.0870.04714.80
5.3.270.0900.05714.74
5.3.260.0870.05314.89
5.3.250.0830.05014.59
5.3.240.0800.05714.79
5.3.230.0830.05314.77
5.3.220.0900.04314.57
5.3.210.0830.05014.70
5.3.200.0870.04714.63
5.3.190.0800.06014.55
5.3.180.1130.05314.55
5.3.170.1070.05314.86
5.3.160.1200.07014.63
5.3.150.1100.04714.70
5.3.140.1000.06014.60
5.3.130.1030.05314.55
5.3.120.0870.05314.61
5.3.110.0800.05714.57
5.3.100.0830.05314.24
5.3.90.1030.05014.21
5.3.80.1230.05014.19
5.3.70.1070.05714.31
5.3.60.1030.05013.99
5.3.50.1030.05014.06
5.3.40.1070.06014.09
5.3.30.0900.05713.98
5.3.20.0970.05013.70
5.3.10.0770.05713.86
5.3.00.0870.05013.78
5.2.170.0830.04711.17
5.2.160.0830.04011.18
5.2.150.0900.03711.06
5.2.140.0830.04311.18
5.2.130.0930.03311.15
5.2.120.0870.03311.25
5.2.110.1030.05011.05
5.2.100.0900.03011.14
5.2.90.0870.04711.08
5.2.80.0730.04011.25
5.2.70.0700.05011.14
5.2.60.0670.04011.18
5.2.50.0730.04011.00
5.2.40.0570.04011.02
5.2.30.0670.03711.01
5.2.20.0630.03710.93
5.2.10.0530.04310.91
5.2.00.0470.05310.71
5.1.60.0570.03310.03
5.1.50.0630.0409.96
5.1.40.0600.02710.00
5.1.30.0500.04010.32
5.1.20.0530.04010.38
5.1.10.0570.03010.11
5.1.00.0500.04010.13
5.0.50.0330.0238.59
5.0.40.0300.0278.38
5.0.30.0300.0408.28
5.0.20.0330.0238.39
5.0.10.0270.0308.35
5.0.00.0300.0408.18
4.4.90.0300.0175.89
4.4.80.0230.0235.94
4.4.70.0300.0275.91
4.4.60.0330.0175.89
4.4.50.0300.0205.86
4.4.40.0230.0405.88
4.4.30.0330.0175.87
4.4.20.0300.0205.92
4.4.10.0270.0275.93
4.4.00.0230.0375.94
4.3.110.0270.0235.81
4.3.100.0230.0235.78
4.3.90.0370.0205.78
4.3.80.0300.0305.86
4.3.70.0270.0235.91
4.3.60.0230.0235.78
4.3.50.0230.0275.85
4.3.40.0330.0305.84
4.3.30.0130.0234.54
4.3.20.0230.0174.64
4.3.10.0170.0234.52
4.3.00.0100.0237.02

preferences:
53.68 ms | 400 KiB | 5 Q