3v4l.org

run code in 300+ PHP versions simultaneously
<?php function g($a, $b, $c) { f($a, $b, $c); } function f(int $a, int $b = null, int $c = null) { error_log(json_encode([$a, $b, $c])); error_log(json_encode(func_get_args())); } function add1($x) { return ++$x; } function changeF($code, $str) { error_log("in changeF"); preg_match('/^Argument (\\d+) /', $str, $m); $i = $m[1]-1; $a = "$i"; $bt = debug_backtrace(null, 2); $bt1 = $bt[1]['args']; $a = "$a {$bt[1]['args'][$i]}"; $bt[1]['args'][$i] = add1($bt[1]['args'][$i]); $bt1 = $bt[1]['args']; $a = "$a {$bt[1]['args'][$i]}"; error_log($a); return true; } set_error_handler('changeF', E_ALL); //f(2, 1); g(3, 2, 1);

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.0000.02016.75
8.3.50.0110.00522.74
8.3.40.0040.01219.02
8.3.30.0000.01419.08
8.3.20.0040.00420.34
8.3.10.0040.00423.43
8.3.00.0000.00817.63
8.2.180.0060.01316.75
8.2.170.0150.00622.96
8.2.160.0070.00720.34
8.2.150.0050.00324.18
8.2.140.0120.00624.66
8.2.130.0040.00426.16
8.2.120.0110.00721.15
8.2.110.0090.00021.98
8.2.100.0040.00818.22
8.2.90.0000.00819.08
8.2.80.0030.00617.97
8.2.70.0030.00517.50
8.2.60.0040.00417.80
8.2.50.0030.00618.07
8.2.40.0050.00320.07
8.2.30.0000.00718.04
8.2.20.0000.00817.59
8.2.10.0000.00817.95
8.2.00.0050.00217.77
8.1.280.0140.00725.92
8.1.270.0110.00423.89
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.93
8.1.230.0040.00719.14
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.36
8.1.190.0040.00417.22
8.1.180.0000.00818.10
8.1.170.0050.00318.50
8.1.160.0000.00821.91
8.1.150.0080.00018.82
8.1.140.0040.00417.29
8.1.130.0040.00417.86
8.1.120.0070.00017.41
8.1.110.0030.00517.31
8.1.100.0050.00217.36
8.1.90.0040.00417.44
8.1.80.0000.00717.34
8.1.70.0030.00317.30
8.1.60.0030.00617.54
8.1.50.0040.00417.41
8.1.40.0050.00317.40
8.1.30.0040.00417.64
8.1.20.0080.00017.61
8.1.10.0040.00417.50
8.1.00.0030.00517.35
8.0.300.0040.00418.77
8.0.290.0040.00416.58
8.0.280.0000.00718.36
8.0.270.0020.00517.10
8.0.260.0000.00617.09
8.0.250.0030.00317.00
8.0.240.0000.00816.95
8.0.230.0000.00816.93
8.0.220.0030.00316.92
8.0.210.0030.00316.96
8.0.200.0050.00316.87
8.0.190.0070.00016.96
8.0.180.0040.00316.84
8.0.170.0040.00416.91
8.0.160.0040.00416.80
8.0.150.0070.00016.82
8.0.140.0050.00316.86
8.0.130.0000.00513.43
8.0.120.0040.00416.78
8.0.110.0030.00516.91
8.0.100.0000.00816.80
8.0.90.0030.00516.91
8.0.80.0100.00616.93
8.0.70.0040.00416.78
8.0.60.0000.00716.95
8.0.50.0030.00516.88
8.0.30.0090.01216.93
8.0.20.0110.00917.40
8.0.10.0040.00417.09
8.0.00.0090.01416.78
7.4.330.0050.00015.03
7.4.320.0030.00316.46
7.4.300.0030.00316.56
7.4.290.0000.00716.48
7.4.280.0040.00416.50
7.4.270.0040.00416.58
7.4.260.0040.00716.41
7.4.250.0000.00716.55
7.4.240.0070.00016.53
7.4.230.0070.00016.64
7.4.220.0090.01016.43
7.4.210.0100.00316.60
7.4.200.0070.00016.58
7.4.160.0090.00616.52
7.4.150.0030.01617.40
7.4.140.0080.01017.86
7.4.130.0100.00716.62
7.4.120.0050.01216.62
7.4.110.0100.00616.39
7.4.100.0070.01016.30
7.4.90.0070.01116.37
7.4.80.0130.00619.39
7.4.70.0140.00416.75
7.4.60.0100.00716.51
7.4.50.0040.00016.25
7.4.40.0080.00816.59
7.4.30.0170.00616.52
7.4.00.0040.01114.71
7.3.330.0030.00313.23
7.3.320.0000.00813.31
7.3.310.0030.00316.22
7.3.300.0030.00316.34
7.3.290.0040.01116.27
7.3.280.0070.01116.34
7.3.270.0070.01317.40
7.3.260.0080.00816.46
7.3.250.0110.00816.39
7.3.240.0140.01016.69
7.3.230.0100.00616.39
7.3.210.0100.00616.43
7.3.200.0060.00919.39
7.3.190.0100.00716.30
7.3.180.0140.00316.43
7.3.170.0070.01016.58
7.3.160.0130.00316.66
7.2.330.0090.00916.41
7.2.320.0060.01116.59
7.2.310.0070.01316.34
7.2.300.0120.00316.77
7.2.290.0090.00916.46
7.2.60.0090.00616.92
7.2.00.0030.01319.13
7.1.200.0040.00815.76
7.1.100.0220.01018.00
7.1.70.0040.01116.90
7.1.60.0070.01119.40
7.1.50.0170.00016.64
7.1.00.0000.08022.54
7.0.200.0000.00716.01
7.0.140.0030.07321.95
7.0.90.0100.08320.07
7.0.80.0070.08320.05
7.0.70.0070.08720.07
7.0.60.0200.07720.09
7.0.50.0170.05720.43
7.0.40.0170.07320.13
7.0.30.0130.08020.10
7.0.20.0030.05320.05
7.0.10.0030.09020.10
7.0.00.0100.08020.10
5.6.280.0070.07020.87
5.6.230.0000.09020.60
5.6.220.0070.08320.62
5.6.210.0100.06020.48
5.6.200.0100.08721.12
5.6.190.0100.04721.03
5.6.180.0100.08321.12
5.6.170.0130.08021.11
5.6.160.0130.07721.02
5.6.150.0100.04321.02
5.6.140.0200.06321.11
5.6.130.0030.06321.01
5.6.120.0100.05321.03
5.6.110.0100.06721.00
5.6.100.0130.06021.06
5.6.90.0100.03721.00
5.6.80.0030.08720.43
5.6.70.0230.05720.42
5.6.60.0070.08020.40
5.6.50.0070.08020.47
5.6.40.0030.08320.45
5.6.30.0070.08720.40
5.6.20.0070.04020.45
5.6.10.0030.04320.39
5.6.00.0030.05720.48
5.5.370.0000.08720.43
5.5.360.0100.08020.49
5.5.350.0070.09020.43
5.5.340.0100.08320.89
5.5.330.0070.05320.81
5.5.320.0100.04020.88
5.5.310.0100.05020.77
5.5.300.0070.05320.83
5.5.290.0070.08020.89
5.5.280.0030.07720.84
5.5.270.0100.08320.83
5.5.260.0100.04020.83
5.5.250.0030.07320.69
5.5.240.0170.06320.25
5.5.230.0130.07720.29
5.5.220.0070.08320.27
5.5.210.0070.07720.29
5.5.200.0070.08020.00
5.5.190.0000.08020.25
5.5.180.0100.04320.13
5.5.160.0130.07320.27
5.5.150.0030.08320.13
5.5.140.0030.04320.25
5.5.130.0100.06020.18
5.5.120.0170.06720.28
5.5.110.0200.06320.18
5.5.100.0270.06020.13
5.5.90.0200.06720.04
5.5.80.0070.07320.08
5.5.70.0030.05020.11
5.5.60.0230.04720.06
5.5.50.0100.05020.11
5.5.40.0070.07720.16
5.5.30.0070.05720.10
5.5.20.0100.07020.03
5.5.10.0170.06320.15
5.5.00.0070.06020.04
5.4.450.0130.08019.46
5.4.440.0100.07019.38
5.4.430.0030.08019.37
5.4.420.0130.06719.37
5.4.410.0030.04319.41
5.4.400.0030.08318.91
5.4.390.0200.05318.95
5.4.380.0130.04319.18
5.4.370.0070.07719.23
5.4.360.0030.08019.16
5.4.350.0070.04019.18
5.4.340.0070.07319.21
5.4.320.0100.08019.16
5.4.310.0000.04719.21
5.4.300.0000.04019.03
5.4.290.0130.05719.04
5.4.280.0000.04719.03
5.4.270.0000.08019.12
5.4.260.0230.06018.90
5.4.250.0030.07719.04
5.4.240.0030.04319.11
5.4.230.0030.03719.20
5.4.220.0100.07318.84
5.4.210.0070.05018.84
5.4.200.0170.06319.13
5.4.190.0130.06318.94
5.4.180.0000.08019.17
5.4.170.0070.04719.02
5.4.160.0030.07019.02
5.4.150.0100.07719.11
5.4.140.0130.06316.26
5.4.130.0100.05316.46
5.4.120.0070.05716.19
5.4.110.0070.07016.55
5.4.100.0070.07316.44
5.4.90.0070.07016.54
5.4.80.0070.07316.43
5.4.70.0100.06716.55
5.4.60.0070.05716.41
5.4.50.0000.04316.45
5.4.40.0100.05016.46
5.4.30.0100.03316.41
5.4.20.0030.04016.47
5.4.10.0070.03316.35
5.4.00.0070.03315.80
5.3.290.0100.07014.79
5.3.280.0200.06714.69
5.3.270.0030.08314.60
5.3.260.0100.07014.61
5.3.250.0030.07014.63
5.3.240.0200.04714.67
5.3.230.0100.06714.59
5.3.220.0130.06314.52
5.3.210.0070.06314.62
5.3.200.0100.07014.57
5.3.190.0070.07714.66
5.3.180.0030.05314.53
5.3.170.0170.06714.59
5.3.160.0030.04014.61
5.3.150.0100.06014.66
5.3.140.0100.03014.54
5.3.130.0070.04314.59
5.3.120.0030.06714.61
5.3.110.0070.03714.62
5.3.100.0000.04014.00
5.3.90.0070.03313.97
5.3.80.0000.05013.94
5.3.70.0030.03714.02
5.3.60.0030.04013.93
5.3.50.0030.03713.88
5.3.40.0070.04314.04
5.3.30.0000.03313.94
5.3.20.0130.02313.73
5.3.10.0030.05713.77
5.3.00.0070.04713.53
5.2.170.0030.04011.20
5.2.160.0000.03011.07
5.2.150.0030.02711.17
5.2.140.0030.03011.25
5.2.130.0070.05711.09
5.2.120.0070.03011.13
5.2.110.0030.04011.16
5.2.100.0070.05711.15
5.2.90.0030.03011.11
5.2.80.0070.05711.13
5.2.70.0000.04310.95
5.2.60.0030.02711.11
5.2.50.0000.02711.08
5.2.40.0030.03010.91
5.2.30.0000.02711.09
5.2.20.0030.04710.87
5.2.10.0030.03710.79
5.2.00.0000.03010.64
5.1.60.0000.0239.84
5.1.50.0000.0239.99
5.1.40.0000.02710.06
5.1.30.0030.02310.46
5.1.20.0100.02310.30
5.1.10.0000.02310.06
5.1.00.0030.02310.06
5.0.50.0000.0238.56
5.0.40.0070.0238.48
5.0.30.0000.0338.34
5.0.20.0030.0438.27
5.0.10.0030.0308.24
5.0.00.0000.0338.26
4.4.90.0000.0177.31
4.4.80.0030.0107.31
4.4.70.0030.0337.31
4.4.60.0000.0177.31
4.4.50.0000.0207.31
4.4.40.0000.0237.31
4.4.30.0030.0137.31
4.4.20.0000.0137.31
4.4.10.0000.0137.31
4.4.00.0000.0277.31
4.3.110.0000.0177.31
4.3.100.0000.0177.31
4.3.90.0000.0237.31
4.3.80.0030.0407.31
4.3.70.0070.0207.31
4.3.60.0000.0137.31
4.3.50.0030.0137.31
4.3.40.0000.0237.31
4.3.30.0000.0237.31
4.3.20.0030.0207.31
4.3.10.0030.0137.31
4.3.00.0000.0177.31

preferences:
40.9 ms | 401 KiB | 5 Q