3v4l.org

run code in 300+ PHP versions simultaneously
<?php function f($req, $opt = null, ...$params) { // $params is an array containing the remaining arguments. printf('$req: %d; $opt: %d; number of params: %d'."\n", $req, $opt, count($params)); } f(1); f(1, 2); f(1, 2, 3); f(1, 2, 3, 4); f(1, 2, 3, 4, 5); ?> }

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.0100.00718.30
8.3.50.0080.00721.90
8.3.40.0110.00318.70
8.3.30.0110.00419.09
8.3.20.0040.00420.38
8.3.10.0050.00322.09
8.3.00.0050.00322.52
8.2.180.0080.00816.32
8.2.170.0190.00018.66
8.2.160.0100.01022.96
8.2.150.0090.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0090.00017.50
8.2.110.0040.00422.25
8.2.100.0090.00319.57
8.2.90.0060.00319.28
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0030.00617.93
8.2.50.0070.00418.07
8.2.40.0070.00018.03
8.2.30.0100.00018.06
8.2.20.0030.00517.51
8.2.10.0040.00419.38
8.2.00.0000.00817.57
8.1.280.0130.00625.92
8.1.270.0040.00422.18
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.68
8.1.230.0100.00019.16
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.22
8.1.190.0040.00417.40
8.1.180.0050.00318.10
8.1.170.0080.00018.71
8.1.160.0040.00421.95
8.1.150.0000.00718.51
8.1.140.0040.00417.26
8.1.130.0070.00017.66
8.1.120.0040.00417.43
8.1.110.0000.00717.43
8.1.100.0020.00517.29
8.1.90.0000.00717.32
8.1.80.0000.00817.34
8.1.70.0040.00417.33
8.1.60.0000.00917.42
8.1.50.0070.00017.36
8.1.40.0000.00717.46
8.1.30.0060.00317.55
8.1.20.0000.00817.57
8.1.10.0000.00717.37
8.1.00.0040.00417.44
8.0.300.0040.00418.77
8.0.290.0040.00417.18
8.0.280.0000.00718.44
8.0.270.0030.00317.14
8.0.260.0060.00016.82
8.0.250.0000.00716.77
8.0.240.0090.00016.81
8.0.230.0070.00016.96
8.0.220.0030.00316.88
8.0.210.0000.00716.89
8.0.200.0000.00616.93
8.0.190.0000.00816.83
8.0.180.0000.00816.77
8.0.170.0000.00816.93
8.0.160.0000.00716.75
8.0.150.0000.00816.79
8.0.140.0050.00316.87
8.0.130.0000.00513.32
8.0.120.0040.00416.87
8.0.110.0000.00716.92
8.0.100.0000.00716.92
8.0.90.0040.00416.71
8.0.80.0070.00816.84
8.0.70.0030.00516.76
8.0.60.0000.00716.96
8.0.50.0070.00016.73
8.0.30.0140.00917.18
8.0.20.0120.00717.40
8.0.10.0030.00516.75
8.0.00.0120.00816.70
7.4.330.0070.00015.00
7.4.320.0030.00316.52
7.4.300.0000.00816.58
7.4.290.0000.00716.52
7.4.280.0030.00316.45
7.4.270.0030.00316.37
7.4.260.0000.00716.59
7.4.250.0000.00816.36
7.4.240.0020.00516.58
7.4.230.0060.00016.30
7.4.220.0120.00616.61
7.4.210.0060.01116.59
7.4.200.0000.00716.58
7.4.190.0000.00716.47
7.4.160.0100.00616.48
7.4.150.0120.00617.40
7.4.140.0110.01517.86
7.4.130.0110.00816.51
7.4.120.0060.01116.32
7.4.110.0110.00716.62
7.4.100.0120.01216.61
7.4.90.0030.01416.44
7.4.80.0070.01019.39
7.4.70.0140.00816.28
7.4.60.0060.01516.35
7.4.50.0080.00016.34
7.4.40.0090.00622.77
7.4.30.0140.00316.16
7.4.00.0040.01214.95
7.3.330.0000.00513.23
7.3.320.0000.00513.12
7.3.310.0050.00316.20
7.3.300.0000.00616.19
7.3.290.0070.00716.30
7.3.280.0090.01116.30
7.3.270.0100.01317.40
7.3.260.0070.01016.42
7.3.250.0100.01016.51
7.3.240.0090.00916.46
7.3.230.0130.00316.41
7.3.210.0110.01116.45
7.3.200.0070.01119.39
7.3.190.0100.00716.45
7.3.180.0090.00616.48
7.3.170.0080.00816.58
7.3.160.0130.00316.33
7.3.120.0030.01014.79
7.2.330.0120.00616.40
7.2.320.0150.00916.74
7.2.310.0140.00616.49
7.2.300.0160.00016.66
7.2.290.0110.01116.45
7.2.00.0090.00919.01
7.1.100.0060.00617.73
7.1.70.0040.01217.04
7.1.60.0110.00419.82
7.1.50.0100.01417.05
7.1.00.0070.07322.35
7.0.200.0080.00416.62
7.0.140.0070.07321.93
7.0.60.0100.05020.08
7.0.50.0170.07017.89
7.0.40.0070.04720.38
7.0.30.0000.04320.19
7.0.20.0230.08020.16
7.0.10.0100.03720.27
7.0.00.0070.05020.32
5.6.280.0000.07720.99
5.6.210.0030.04320.67
5.6.200.0030.04018.12
5.6.190.0100.05720.63
5.6.180.0470.07320.47
5.6.170.0230.05020.51
5.6.160.0170.05720.50
5.6.150.0070.06718.18
5.6.140.0070.05018.14
5.6.130.0070.06718.21
5.6.120.0100.08721.13
5.6.110.0100.08720.98
5.6.100.0130.08021.11
5.6.90.0100.08321.14
5.6.80.0100.07020.38
5.5.350.0270.06720.52
5.5.340.0070.04018.07
5.5.330.0100.08320.43
5.5.320.0270.04020.42
5.5.310.0200.03720.36
5.5.300.0030.04017.92
5.5.290.0100.06317.95
5.5.280.0100.06320.77
5.5.270.0070.07020.79
5.5.260.0030.06020.86
5.5.250.0100.07720.70
5.5.240.0030.08020.26
5.4.450.0100.05319.39
5.4.440.0500.05719.58
5.4.430.0100.05719.32
5.4.420.0170.05019.52
5.4.410.0130.05019.57
5.4.400.0200.04318.81
5.4.390.0030.06718.70
5.4.380.0270.05318.63
5.4.370.0030.06718.56
5.4.360.0030.06318.75
5.4.350.0200.05018.70
5.4.340.0130.05718.84
5.4.320.0060.03612.52
5.4.310.0060.03612.51
5.4.300.0050.04112.52
5.4.290.0040.03912.50
5.4.280.0060.03612.40
5.4.270.0070.07018.88
5.4.260.0030.06719.00
5.4.250.0170.06718.88
5.4.240.0170.05018.94
5.4.230.0100.05718.88
5.4.220.0170.08018.89
5.4.210.0170.06718.63
5.4.200.0170.09018.89
5.4.190.0100.07018.85
5.4.180.0130.06318.73
5.4.170.0130.06718.72
5.4.160.0070.05318.83
5.4.150.0100.07318.76
5.4.140.0070.05716.38
5.4.130.0100.04716.36
5.4.120.0130.06716.41
5.4.110.0130.04716.27
5.4.100.0030.06716.55
5.4.90.0000.06716.27
5.4.80.0100.06316.29
5.4.70.0130.06716.46
5.4.60.0100.07016.35
5.4.50.0130.05316.40
5.4.40.0070.05316.40
5.4.30.0100.06316.41
5.4.20.0070.06016.50
5.4.10.0200.06016.35
5.4.00.0100.06315.82
5.3.290.0060.04212.80
5.3.280.0070.07014.75
5.3.270.0100.06014.68
5.3.260.0070.06014.57
5.3.250.0130.05314.83
5.3.240.0070.06314.68
5.3.230.0070.06014.66
5.3.220.0070.07314.46
5.3.210.0030.08314.65
5.3.200.0130.06714.39
5.3.190.0130.05314.54
5.3.180.0170.04714.73
5.3.170.0070.06714.58
5.3.160.0100.05714.53
5.3.150.0070.05314.76
5.3.140.0130.05014.77
5.3.130.0170.06714.62
5.3.120.0170.06714.60
5.3.110.0170.06714.61
5.3.100.0070.05314.11
5.3.90.0030.06713.85
5.3.80.0070.06014.09
5.3.70.0130.06313.98
5.3.60.0100.06714.09
5.3.50.0100.05013.87
5.3.40.0230.05314.11
5.3.30.0070.05713.87
5.3.20.0070.05313.85
5.3.10.0030.05013.74
5.3.00.0000.06713.71
5.2.170.0070.04011.36
5.2.160.0030.04711.30
5.2.150.0070.05711.14
5.2.140.0070.04711.04
5.2.130.0030.04711.08
5.2.120.0100.03711.16
5.2.110.0100.04311.05
5.2.100.0130.03711.20
5.2.90.0070.05711.25
5.2.80.0000.05311.07
5.2.70.0100.04710.91
5.2.60.0130.04311.14
5.2.50.0100.05711.09
5.2.40.0070.05311.21
5.2.30.0070.04311.05
5.2.20.0030.04711.04
5.2.10.0100.05010.82
5.2.00.0100.05010.57
5.1.60.0070.0479.98
5.1.50.0000.05310.14
5.1.40.0130.0409.94
5.1.30.0030.05310.32
5.1.20.0030.05310.53
5.1.10.0130.04310.11
5.1.00.0100.04010.26
5.0.50.0070.0378.59
5.0.40.0030.0438.45
5.0.30.0100.0508.17
5.0.20.0100.0338.16
5.0.10.0070.0408.32
5.0.00.0030.0408.11
4.4.90.0030.0305.86
4.4.80.0070.0175.82
4.4.70.0100.0175.86
4.4.60.0000.0335.85
4.4.50.0000.0275.86
4.4.40.0070.0335.82
4.4.30.0070.0205.86
4.4.20.0070.0175.97
4.4.10.0030.0306.02
4.4.00.0000.0505.89
4.3.110.0030.0235.77
4.3.100.0030.0275.74
4.3.90.0000.0305.74
4.3.80.0000.0375.74
4.3.70.0030.0235.76
4.3.60.0100.0235.74
4.3.50.0030.0275.74
4.3.40.0070.0335.71
4.3.30.0030.0305.47
4.3.20.0070.0175.47
4.3.10.0070.0175.47
4.3.00.0130.0177.37

preferences:
38.06 ms | 400 KiB | 5 Q