3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* * PHP 5.6 Variadics allow us to pack arguments into arrays from the function prototype! * Typically you would use a combination of func_get_args and array_slice to grab these * function arguments from the stack frame, but Variadics make the syntax much nicer. */ function bond($agent) { $bondingAgents = array_slice(func_get_args(), 1); $bonding = ""; foreach ($bondingAgents as $bond) { $bonding .= "$agent-$bond\n"; } } header('Content-type: text/plain'); echo bond("Hydrogen", "Oxide", "Peroxide", "Dioxide");

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.00618.31
8.3.50.0070.00721.33
8.3.40.0110.00318.77
8.3.30.0000.01418.96
8.3.20.0050.00320.16
8.3.10.0040.00421.92
8.3.00.0040.00422.58
8.2.180.0150.00316.50
8.2.170.0040.01122.96
8.2.160.0030.01019.21
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0100.00026.16
8.2.120.0030.00519.54
8.2.110.0060.00322.05
8.2.100.0070.00419.31
8.2.90.0000.00719.39
8.2.80.0030.00618.04
8.2.70.0000.00817.63
8.2.60.0080.00017.93
8.2.50.0030.00618.07
8.2.40.0040.00418.09
8.2.30.0030.00518.00
8.2.20.0070.00017.59
8.2.10.0040.00417.62
8.2.00.0090.00017.73
8.1.280.0090.00625.92
8.1.270.0030.00620.44
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00424.02
8.1.230.0070.00419.00
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0080.00017.23
8.1.190.0040.00417.53
8.1.180.0060.00318.61
8.1.170.0030.00518.65
8.1.160.0070.00022.18
8.1.150.0000.00818.63
8.1.140.0040.00417.50
8.1.130.0000.00717.92
8.1.120.0030.00417.41
8.1.110.0040.00417.43
8.1.100.0000.00817.37
8.1.90.0000.00717.49
8.1.80.0090.00017.50
8.1.70.0000.00717.34
8.1.60.0040.00417.48
8.1.50.0040.00417.42
8.1.40.0080.00017.52
8.1.30.0040.00417.53
8.1.20.0000.00817.57
8.1.10.0040.00417.45
8.1.00.0040.00717.32
8.0.300.0070.00018.77
8.0.290.0000.00817.18
8.0.280.0040.00418.46
8.0.270.0050.00217.29
8.0.260.0070.00016.79
8.0.250.0030.00316.95
8.0.240.0040.00416.84
8.0.230.0000.00716.95
8.0.220.0030.00316.88
8.0.210.0000.00716.78
8.0.200.0030.00316.93
8.0.190.0050.00216.82
8.0.180.0040.00416.96
8.0.170.0050.00316.92
8.0.160.0060.00316.85
8.0.150.0000.00716.79
8.0.140.0050.00216.86
8.0.130.0000.00613.29
8.0.120.0030.00516.77
8.0.110.0030.00416.81
8.0.100.0000.00716.88
8.0.90.0000.00716.83
8.0.80.0070.01416.91
8.0.70.0000.00816.88
8.0.60.0070.00016.77
8.0.50.0000.00716.94
8.0.30.0090.01017.12
8.0.20.0140.00817.40
8.0.10.0030.00516.86
8.0.00.0130.00316.76
7.4.330.0030.00315.00
7.4.320.0000.00716.65
7.4.300.0000.00616.58
7.4.290.0030.00316.61
7.4.280.0070.00016.57
7.4.270.0000.00716.68
7.4.260.0030.00316.62
7.4.250.0040.00416.61
7.4.240.0030.00416.56
7.4.230.0030.00316.33
7.4.220.0090.00616.66
7.4.210.0070.01016.55
7.4.200.0000.00716.68
7.4.190.0080.00016.39
7.4.160.0070.01016.55
7.4.150.0090.00817.40
7.4.140.0120.01017.86
7.4.130.0080.01116.43
7.4.120.0150.00216.52
7.4.110.0040.01816.55
7.4.100.0100.00716.56
7.4.90.0150.00916.37
7.4.80.0060.01619.39
7.4.70.0060.00916.47
7.4.60.0090.00716.65
7.4.50.0040.00416.42
7.4.40.0000.01022.77
7.4.30.0110.00616.59
7.4.00.0110.00415.13
7.3.330.0000.00513.30
7.3.320.0060.00013.17
7.3.310.0000.00816.34
7.3.300.0030.00316.22
7.3.290.0070.00716.27
7.3.280.0090.00716.37
7.3.270.0110.00617.40
7.3.260.0070.01116.50
7.3.250.0130.00516.51
7.3.240.0040.01316.36
7.3.230.0120.00616.61
7.3.210.0090.00816.64
7.3.200.0130.00319.39
7.3.190.0100.01116.43
7.3.180.0070.01016.29
7.3.170.0100.00716.40
7.3.160.0120.00316.37
7.3.120.0040.01114.90
7.2.330.0160.00716.52
7.2.320.0180.00416.42
7.2.310.0100.00616.51
7.2.300.0090.01516.62
7.2.290.0040.01216.60
7.1.100.0000.01118.20
7.1.70.0080.00316.92
7.1.60.0100.01319.82
7.1.50.0240.01434.86
7.1.00.0030.03322.40
7.0.200.0360.00714.50
7.0.140.0030.07322.17
7.0.100.0170.05320.02
7.0.90.0030.08319.95
7.0.80.0170.07720.01
7.0.70.0030.05319.93
7.0.60.0330.06320.00
7.0.50.0370.06320.30
7.0.40.0100.06320.10
7.0.30.0070.04320.10
7.0.20.0030.04320.07
7.0.10.0030.04320.04
7.0.00.0030.04320.03
5.6.280.0030.07321.15
5.6.250.0030.07720.54
5.6.240.0100.07320.64
5.6.230.0100.07720.67
5.6.220.0100.07720.63
5.6.210.0070.08320.50
5.6.200.0100.07020.95
5.6.190.0100.05320.95
5.6.180.0170.07321.04
5.6.170.0030.04321.05
5.6.160.0030.04321.02
5.6.150.0000.04721.12
5.6.140.0070.04321.12
5.6.130.0030.04321.04
5.6.120.0070.04020.94
5.6.110.0070.04721.02
5.6.100.0070.04721.05
5.6.90.0030.04321.04
5.6.80.0070.03320.44
5.6.70.0000.08720.47
5.6.60.0030.04020.44
5.6.50.0070.03720.44
5.6.40.0000.04320.30
5.6.30.0030.04020.29
5.6.20.0030.03320.38
5.6.10.0030.04320.30
5.6.00.0030.04320.30
5.5.380.0130.06320.58
5.5.370.0170.06720.45
5.5.360.0130.07720.46
5.5.350.0030.09020.48
5.5.340.0130.07020.86
5.5.330.0170.06320.89
5.5.320.0100.04320.74
5.5.310.0070.04020.90
5.5.300.0100.04720.90
5.5.290.0000.04720.90
5.5.280.0100.03720.93
5.5.270.0100.03720.92
5.5.260.0200.03720.76
5.5.250.0070.04720.70
5.5.240.0030.04320.28
5.5.230.0030.03720.21
5.5.220.0030.04020.21
5.5.210.0030.04020.29
5.5.200.0030.04020.09
5.5.190.0070.04320.19
5.5.180.0100.03720.24
5.5.160.0030.04020.16
5.5.150.0130.02720.15
5.5.140.0000.04320.28
5.5.130.0030.04020.27
5.5.120.0030.04020.12
5.5.110.0000.04720.11
5.5.100.0000.04319.96
5.5.90.0000.03320.11
5.5.80.0070.03720.07
5.5.70.0100.03320.16
5.5.60.0000.04020.05
5.5.50.0030.04020.16
5.5.40.0070.03720.09
5.5.30.0100.02719.94
5.5.20.0030.04720.09
5.5.10.0070.06720.06
5.5.00.0070.03719.97
5.4.450.0030.04019.54
5.4.440.0000.04319.46
5.4.430.0070.04019.50
5.4.420.0070.03719.48
5.4.410.0100.04319.36
5.4.400.0000.04019.05
5.4.390.0130.04318.91
5.4.380.0000.04319.05
5.4.370.0030.04019.21
5.4.360.0100.06319.05
5.4.350.0070.03719.04
5.4.340.0100.03319.09
5.4.320.0030.03018.93
5.4.310.0030.04019.05
5.4.300.0130.02719.16
5.4.290.0070.04318.94
5.4.280.0030.03319.04
5.4.270.0030.04019.12
5.4.260.0070.03018.90
5.4.250.0030.03019.08
5.4.240.0070.04019.13
5.4.230.0030.03719.03
5.4.220.0070.03318.84
5.4.210.0000.03719.03
5.4.200.0030.04318.94
5.4.190.0070.03319.11
5.4.180.0030.03019.17
5.4.170.0130.06719.22
5.4.160.0000.08019.03
5.4.150.0200.06319.11
5.4.140.0130.06316.25
5.4.130.0030.04016.47
5.4.120.0000.08016.41
5.4.110.0000.08016.50
5.4.100.0030.07316.34
5.4.90.0030.07016.44
5.4.80.0000.04016.51
5.4.70.0100.05316.41
5.4.60.0130.05716.32
5.4.50.0030.07016.33
5.4.40.0030.08716.38
5.4.30.0070.06016.31
5.4.20.0130.05716.40
5.4.10.0130.06716.47
5.4.00.0070.07315.87
5.3.290.0000.04014.60
5.3.280.0070.03714.71
5.3.270.0100.07014.73
5.3.260.0070.08014.59
5.3.250.0030.05714.57
5.3.240.0000.05314.64
5.3.230.0170.07014.52
5.3.220.0000.05014.70
5.3.210.0030.08014.55
5.3.200.0100.06714.69
5.3.190.0000.04714.71
5.3.180.0000.04314.58
5.3.170.0030.07314.54
5.3.160.0070.04714.70
5.3.150.0200.03314.63
5.3.140.0030.05014.67
5.3.130.0000.08014.53
5.3.120.0030.04014.66
5.3.110.0000.05714.68
5.3.100.0070.06014.04
5.3.90.0070.06014.09
5.3.80.0100.07014.08
5.3.70.0000.06713.95
5.3.60.0070.04313.93
5.3.50.0100.05714.04
5.3.40.0070.05013.96
5.3.30.0070.07313.96
5.3.20.0100.07013.72
5.3.10.0130.06313.71
5.3.00.0170.06013.57
5.2.170.0070.05711.25
5.2.160.0070.06011.28
5.2.150.0030.06711.17
5.2.140.0070.06011.23
5.2.130.0130.04711.09
5.2.120.0070.06011.03
5.2.110.0100.05711.22
5.2.100.0030.06311.16
5.2.90.0030.06011.12
5.2.80.0070.06011.16
5.2.70.0030.04011.15
5.2.60.0030.05711.15
5.2.50.0000.04011.14
5.2.40.0070.03011.02
5.2.30.0070.06011.00
5.2.20.0030.03310.91
5.2.10.0000.06310.93
5.2.00.0030.06010.66
5.1.60.0070.04310.07
5.1.50.0000.0579.98
5.1.40.0030.05310.04
5.1.30.0070.05010.40
5.1.20.0000.05710.35
5.1.10.0100.02310.12
5.1.00.0130.04710.12
5.0.50.0030.0378.39
5.0.40.0030.0338.29
5.0.30.0000.0638.23
5.0.20.0030.0378.30
5.0.10.0070.0378.26
5.0.00.0000.0708.16
4.4.90.0000.0376.82
4.4.80.0030.0306.82
4.4.70.0000.0376.82
4.4.60.0070.0336.82
4.4.50.0030.0336.82
4.4.40.0030.0536.82
4.4.30.0100.0276.82
4.4.20.0030.0336.82
4.4.10.0070.0306.82
4.4.00.0000.0606.82
4.3.110.0000.0276.82
4.3.100.0070.0336.82
4.3.90.0000.0376.82
4.3.80.0000.0506.82
4.3.70.0000.0336.82
4.3.60.0100.0276.82
4.3.50.0000.0306.82
4.3.40.0030.0506.82
4.3.30.0030.0176.82
4.3.20.0030.0236.82
4.3.10.0030.0376.82
4.3.00.0000.0276.82

preferences:
49.78 ms | 401 KiB | 5 Q