3v4l.org

run code in 300+ PHP versions simultaneously
<?php function concatenate($transform, ...$strings) { $string = ''; foreach($strings as $piece) { $string .= $piece; } return($transform($string)); } echo concatenate("strtoupper", "I'd ", "like ", 4 + 2, " apples");

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.0120.00416.49
8.3.50.0080.00822.89
8.3.40.0140.00718.97
8.3.30.0060.00918.96
8.3.20.0000.00720.16
8.3.10.0000.00723.65
8.3.00.0080.00019.38
8.2.180.0140.00016.38
8.2.170.0110.00422.96
8.2.160.0100.00320.26
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0110.00426.16
8.2.120.0080.00020.95
8.2.110.0060.00322.26
8.2.100.0090.00317.91
8.2.90.0040.00419.13
8.2.80.0080.00017.97
8.2.70.0040.00417.63
8.2.60.0040.00417.80
8.2.50.0040.00418.07
8.2.40.0090.00018.34
8.2.30.0080.00017.99
8.2.20.0050.00317.62
8.2.10.0040.00418.04
8.2.00.0040.00417.55
8.1.280.0130.00325.92
8.1.270.0050.00323.82
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0040.00423.84
8.1.230.0040.00719.04
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.13
8.1.190.0050.00317.23
8.1.180.0060.00318.10
8.1.170.0040.00418.52
8.1.160.0070.00022.02
8.1.150.0050.00318.91
8.1.140.0000.00817.48
8.1.130.0030.00317.75
8.1.120.0070.00017.35
8.1.110.0040.00417.46
8.1.100.0000.00717.41
8.1.90.0000.00717.38
8.1.80.0030.00417.44
8.1.70.0030.00317.45
8.1.60.0000.00817.48
8.1.50.0050.00317.52
8.1.40.0040.00417.47
8.1.30.0000.00817.55
8.1.20.0070.00317.67
8.1.10.0060.00317.49
8.1.00.0040.00417.43
8.0.300.0070.00018.77
8.0.290.0040.00416.63
8.0.280.0020.00518.39
8.0.270.0000.00717.17
8.0.260.0030.00617.25
8.0.250.0070.00016.96
8.0.240.0030.00616.84
8.0.230.0000.00816.91
8.0.220.0040.00416.81
8.0.210.0030.00316.92
8.0.200.0030.00316.97
8.0.190.0030.00316.83
8.0.180.0040.00416.94
8.0.170.0030.00516.80
8.0.160.0040.00416.99
8.0.150.0070.00016.87
8.0.140.0070.00016.80
8.0.130.0050.00513.30
8.0.120.0080.00016.80
8.0.110.0000.00716.70
8.0.100.0040.00416.83
8.0.90.0040.00416.89
8.0.80.0040.01216.78
8.0.70.0000.00816.75
8.0.60.0000.00716.78
8.0.50.0040.00416.94
8.0.30.0130.00916.88
8.0.20.0120.00717.40
8.0.10.0070.00016.97
8.0.00.0120.00916.80
7.4.330.0070.00015.00
7.4.320.0030.00316.49
7.4.300.0000.00616.43
7.4.290.0060.00016.50
7.4.280.0000.00716.46
7.4.270.0040.00416.52
7.4.260.0000.00716.42
7.4.250.0040.00416.35
7.4.240.0040.00316.42
7.4.230.0060.00316.68
7.4.220.0150.00416.48
7.4.210.0030.01216.61
7.4.200.0040.00416.49
7.4.160.0060.00916.59
7.4.150.0030.01417.40
7.4.140.0120.00817.86
7.4.130.0150.00516.37
7.4.120.0090.00816.54
7.4.110.0080.01216.47
7.4.100.0150.00616.44
7.4.90.0170.00716.45
7.4.80.0100.00719.39
7.4.70.0100.00716.54
7.4.60.0070.01016.46
7.4.50.0030.00316.48
7.4.40.0030.01316.33
7.4.30.0080.00816.52
7.4.00.0000.01715.04
7.3.330.0000.00513.18
7.3.320.0000.00513.22
7.3.310.0030.00316.17
7.3.300.0000.00716.23
7.3.290.0000.01516.36
7.3.280.0110.00416.38
7.3.270.0060.01217.40
7.3.260.0160.00316.54
7.3.250.0070.01116.47
7.3.240.0170.00716.34
7.3.230.0100.00716.63
7.3.210.0080.00816.50
7.3.200.0060.01319.39
7.3.190.0110.00816.43
7.3.180.0100.00616.53
7.3.170.0060.01016.27
7.3.160.0030.01316.23
7.2.330.0130.01016.50
7.2.320.0070.01616.44
7.2.310.0080.00816.74
7.2.300.0050.01316.63
7.2.290.0170.00016.80
7.1.70.0000.01516.93
7.1.60.0030.02019.40
7.1.50.0100.01017.11
7.1.00.0030.07722.33
7.0.200.0060.00316.89
7.0.140.0030.07322.15
7.0.60.0030.08019.81
7.0.50.0100.07717.95
7.0.40.0100.06019.96
7.0.30.0170.05320.20
7.0.20.0570.06720.02
7.0.10.0030.05020.15
7.0.00.0070.08320.18
5.6.280.0030.07320.91
5.6.210.0070.05720.77
5.6.200.0070.03718.16
5.6.190.0030.08720.52
5.6.180.0230.08020.39
5.6.170.0230.05020.44
5.6.160.0130.07720.50
5.6.150.0070.04318.27
5.6.140.0100.03318.21
5.6.130.0100.04718.24
5.6.120.0000.06021.00
5.6.110.0100.06021.11
5.6.100.0130.07320.98
5.6.90.0230.04321.12
5.6.80.0030.05320.29
5.5.350.0230.04320.46
5.5.340.0070.06017.99
5.5.330.0130.07320.34
5.5.320.0200.07720.35
5.5.310.0170.04320.30
5.5.300.0070.08017.94
5.5.290.0030.08317.95
5.5.280.0130.07720.90
5.5.270.0070.08720.79
5.5.260.0170.04020.97
5.5.250.0030.04320.69
5.5.240.0000.08320.26
5.4.450.0730.06719.47
5.4.440.0500.06019.51
5.4.430.0600.06019.48
5.4.420.0030.06019.40
5.4.410.0770.05719.52
5.4.400.0230.05718.83
5.4.390.0370.05318.81
5.4.380.0170.06318.57
5.4.370.0170.04318.84
5.4.360.0170.05018.72
5.4.350.0070.03512.03
5.4.340.0060.03612.02
5.4.320.0040.03812.52
5.4.310.0080.04112.51
5.4.300.0060.03712.52
5.4.290.0050.03912.51
5.4.280.0070.03512.40
5.4.270.0050.03712.41
5.4.260.0050.03812.41
5.4.250.0060.03612.41
5.4.240.0070.03312.41
5.4.230.0110.03212.40
5.4.220.0050.03612.39
5.4.210.0020.03812.39
5.4.200.0080.03512.40
5.4.190.0060.03612.39
5.4.180.0040.03812.39
5.4.170.0120.03012.40
5.4.160.0050.03812.39
5.4.150.0050.03612.39
5.4.140.0080.04612.09
5.4.130.0090.03112.07
5.4.120.0010.03912.03
5.4.110.0070.03312.03
5.4.100.0050.03412.02
5.4.90.0080.03312.03
5.4.80.0050.04112.03
5.4.70.0060.03312.02
5.4.60.0050.03412.02
5.4.50.0080.03712.02
5.4.40.0060.03512.01
5.4.30.0050.03612.00
5.4.20.0030.03812.00
5.4.10.0080.03212.00
5.4.00.0060.03511.50
5.3.290.0040.04312.80
5.3.280.0050.03712.71
5.3.270.0050.03912.72
5.3.260.0020.04212.72
5.3.250.0040.03812.72
5.3.240.0070.03512.72
5.3.230.0030.04012.71
5.3.220.0060.03612.68
5.3.210.0070.03812.68
5.3.200.0050.03712.68
5.3.190.0040.04012.68
5.3.180.0090.03412.67
5.3.170.0060.03512.67
5.3.160.0050.04012.68
5.3.150.0040.03812.67
5.3.140.0050.03612.66
5.3.130.0060.03812.66
5.3.120.0050.03912.65
5.3.110.0060.03912.66
5.3.100.0090.03312.13
5.3.90.0050.03712.11
5.3.80.0050.03712.09
5.3.70.0110.03512.10
5.3.60.0040.03912.08
5.3.50.0090.03212.02
5.3.40.0060.03512.02
5.3.30.0060.03411.98
5.3.20.0040.03611.77
5.3.10.0040.03611.74
5.3.00.0060.03511.71
5.2.170.0040.0329.21
5.2.160.0040.0299.21
5.2.150.0070.0289.21
5.2.140.0050.0309.21
5.2.130.0080.0309.17
5.2.120.0040.0339.18
5.2.110.0060.0369.18
5.2.100.0060.0349.18
5.2.90.0030.0389.18
5.2.80.0040.0379.18
5.2.70.0090.0259.17
5.2.60.0040.0309.13
5.2.50.0040.0309.09
5.2.40.0040.0299.06
5.2.30.0060.0289.05
5.2.20.0050.0289.04
5.2.10.0020.0318.95
5.2.00.0040.0338.81
5.1.60.0020.0268.09
5.1.50.0030.0268.08
5.1.40.0040.0258.07
5.1.30.0030.0308.42
5.1.20.0070.0258.43
5.1.10.0030.0278.16
5.1.00.0080.0278.16
5.0.50.0050.0196.64
5.0.40.0020.0216.49
5.0.30.0040.0316.31
5.0.20.0040.0196.28
5.0.10.0050.0186.25
5.0.00.0030.0386.25
4.4.90.0030.0224.78
4.4.80.0020.0194.75
4.4.70.0050.0144.75
4.4.60.0010.0184.75
4.4.50.0030.0154.77
4.4.40.0060.0214.71
4.4.30.0010.0174.76
4.4.20.0020.0184.84
4.4.10.0030.0144.84
4.4.00.0030.0244.76
4.3.110.0020.0164.66
4.3.100.0040.0134.67
4.3.90.0010.0164.63
4.3.80.0020.0334.58
4.3.70.0040.0124.63
4.3.60.0040.0134.63
4.3.50.0040.0284.63
4.3.40.0020.0314.54
4.3.30.0020.0173.30
4.3.20.0000.0183.29
4.3.10.0030.0223.24
4.3.00.0130.0237.11

preferences:
39.92 ms | 401 KiB | 5 Q