3v4l.org

run code in 300+ PHP versions simultaneously
<?php function str_multiple_replace($str, $needle, $subs) { return vsprintf(str_replace(array('%', $needle), array('%%', '%s'), $string), $subs); } $string = ">>>?<<<%%s>>>?<<<>>>?<<<"; echo str_multiple_replace($string, '?', array('Hello', 'World', '!'));

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.70.0090.00616.75
8.3.60.0160.00318.45
8.3.50.0070.00922.07
8.3.40.0040.01118.96
8.3.30.0120.00419.27
8.3.20.0000.00820.35
8.3.10.0050.00321.93
8.3.00.0160.00322.39
8.2.180.0040.01216.84
8.2.170.0040.01122.96
8.2.160.0100.00320.87
8.2.150.0030.00524.18
8.2.140.0050.00324.66
8.2.130.0030.00626.16
8.2.120.0000.00817.61
8.2.110.0090.00020.35
8.2.100.0080.00417.91
8.2.90.0030.00618.28
8.2.80.0030.00617.97
8.2.70.0030.00617.38
8.2.60.0040.00418.05
8.2.50.0080.00018.07
8.2.40.0040.00418.34
8.2.30.0040.00417.95
8.2.20.0040.00417.74
8.2.10.0050.00217.65
8.2.00.0030.00617.75
8.1.280.0130.00725.92
8.1.270.0040.00422.05
8.1.260.0000.00826.35
8.1.250.0000.00828.09
8.1.240.0060.00322.04
8.1.230.0080.00321.10
8.1.220.0040.00417.78
8.1.210.0050.00518.91
8.1.200.0080.00317.35
8.1.190.0000.00717.41
8.1.180.0060.00318.10
8.1.170.0040.00418.66
8.1.160.0040.00422.02
8.1.150.0070.00018.70
8.1.140.0040.00417.51
8.1.130.0000.00817.82
8.1.120.0000.00717.39
8.1.110.0000.00817.39
8.1.100.0070.00017.46
8.1.90.0050.00317.32
8.1.80.0030.00317.34
8.1.70.0030.00317.42
8.1.60.0110.00017.48
8.1.50.0030.00517.43
8.1.40.0040.00417.43
8.1.30.0040.00417.54
8.1.20.0030.00517.70
8.1.10.0040.00417.54
8.1.00.0080.00017.46
8.0.300.0040.00420.27
8.0.290.0030.00317.05
8.0.280.0030.00318.48
8.0.270.0030.00317.27
8.0.260.0030.00316.80
8.0.250.0070.00017.02
8.0.240.0040.00417.03
8.0.230.0000.00716.97
8.0.220.0030.00316.90
8.0.210.0030.00316.91
8.0.200.0030.00317.03
8.0.190.0030.00517.00
8.0.180.0050.00216.91
8.0.170.0040.00416.97
8.0.160.0050.00216.89
8.0.150.0040.00416.89
8.0.140.0040.00416.79
8.0.130.0000.00613.35
8.0.120.0000.00716.81
8.0.110.0040.00416.94
8.0.100.0040.00417.06
8.0.90.0070.00016.86
8.0.80.0070.01416.84
8.0.70.0000.00716.91
8.0.60.0050.00316.82
8.0.50.0040.00416.94
8.0.30.0160.00316.96
8.0.20.0060.01317.40
8.0.10.0040.00416.96
8.0.00.0070.01216.68
7.4.330.0020.00215.00
7.4.320.0030.00316.58
7.4.300.0000.00616.59
7.4.290.0050.00516.59
7.4.280.0030.00316.49
7.4.270.0000.00816.59
7.4.260.0060.00316.52
7.4.250.0000.00716.46
7.4.240.0040.00416.41
7.4.230.0000.00716.43
7.4.220.0070.01116.37
7.4.210.0090.00516.53
7.4.200.0070.00016.63
7.4.190.0000.00716.41
7.4.160.0120.00916.55
7.4.150.0140.00717.40
7.4.140.0120.00617.86
7.4.130.0070.01116.49
7.4.120.0050.01216.59
7.4.110.0030.01416.62
7.4.100.0150.00616.65
7.4.90.0060.01616.65
7.4.80.0170.00019.39
7.4.70.0070.01316.45
7.4.60.0000.01516.59
7.4.50.0030.00616.35
7.4.40.0100.00722.77
7.4.30.0060.00916.51
7.4.00.0050.01115.04
7.3.330.0030.00313.44
7.3.320.0000.00513.32
7.3.310.0060.00316.26
7.3.300.0070.00016.38
7.3.290.0090.00616.43
7.3.280.0080.00916.32
7.3.270.0090.00917.40
7.3.260.0080.00916.50
7.3.250.0120.00616.56
7.3.240.0090.00616.57
7.3.230.0100.00716.55
7.3.210.0030.01316.46
7.3.200.0130.01019.39
7.3.190.0070.01616.41
7.3.180.0030.01216.42
7.3.170.0120.00916.47
7.3.160.0080.00816.37
7.3.120.0070.00914.90
7.3.110.0040.01314.83
7.3.100.0070.00914.73
7.3.90.0090.00614.84
7.3.80.0040.01214.96
7.3.70.0060.00914.88
7.3.60.0030.01114.91
7.3.50.0040.01014.63
7.3.40.0050.00714.78
7.3.30.0030.00714.96
7.3.20.0010.01016.65
7.3.10.0070.00816.68
7.3.00.0040.00816.53
7.2.330.0110.01116.65
7.2.320.0090.00916.56
7.2.310.0150.00816.37
7.2.300.0080.01216.70
7.2.290.0060.01216.35
7.2.250.0060.01314.82
7.2.240.0050.01214.92
7.2.230.0080.01114.98
7.2.220.0050.00914.89
7.2.210.0060.00814.98
7.2.200.0070.00615.05
7.2.190.0060.00914.97
7.2.180.0100.00714.89
7.2.170.0050.00914.99
7.2.00.0000.01719.17
7.1.330.0040.01015.80
7.1.320.0030.01115.68
7.1.310.0070.00515.71
7.1.300.0070.00815.74
7.1.290.0080.00315.75
7.1.280.0060.00815.73
7.1.270.0050.00615.78
7.1.260.0050.00715.69
7.1.100.0040.00718.23
7.1.70.0000.00717.04
7.1.60.0100.00719.82
7.1.50.0130.00916.99
7.1.00.0030.07722.29
7.0.200.0040.00416.70
7.0.140.0030.07021.93
7.0.60.0070.08719.86
7.0.50.0130.07317.97
7.0.40.0100.06720.18
7.0.30.0170.04320.13
7.0.20.0330.07020.20
7.0.10.0070.05020.13
7.0.00.0070.08020.29
5.6.280.0000.07321.12
5.6.210.0170.05320.67
5.6.200.0030.08718.19
5.6.190.0100.03720.77
5.6.180.0230.07020.55
5.6.170.0130.04320.71
5.6.160.0100.04020.42
5.6.150.0100.07318.23
5.6.140.0070.04018.24
5.6.130.0130.07318.16
5.6.120.0130.07721.10
5.6.110.0070.08020.99
5.6.100.0070.04020.98
5.6.90.0130.07021.13
5.6.80.0030.08320.39
5.5.350.0000.07320.30
5.5.340.0070.07718.02
5.5.330.0000.08720.25
5.5.320.0330.07320.34
5.5.310.0230.07720.51
5.5.300.0030.08717.98
5.5.290.0070.05017.98
5.5.280.0030.04020.77
5.5.270.0100.04320.80
5.5.260.0170.07020.86
5.5.250.0170.07320.79
5.5.240.0000.08020.06
5.4.450.0900.04719.55
5.4.440.0400.05019.45
5.4.430.0970.00019.33
5.4.420.1300.00019.54
5.4.410.0170.06718.70
5.4.400.0170.04718.66
5.4.390.0130.04718.76
5.4.380.0400.04018.73
5.4.370.0230.05318.61
5.4.360.0300.04018.57
5.4.350.0200.05318.79
5.4.340.0270.05318.77
5.4.320.0050.03712.51
5.4.310.0070.04112.50
5.4.300.0060.03512.50
5.4.290.0090.03412.50
5.4.280.0060.04612.39
5.4.270.0090.03912.40
5.4.260.0060.04112.39
5.4.250.0050.03712.40
5.4.240.0090.04112.40
5.4.230.0080.04112.39
5.4.220.0070.03612.39
5.4.210.0040.04312.39
5.4.200.0060.04012.39
5.4.190.0120.04712.38
5.4.180.0150.04212.38
5.4.170.0190.03812.39
5.4.160.0170.04212.39
5.4.150.0170.04412.38
5.4.140.0130.04412.06
5.4.130.0180.04112.05
5.4.120.0170.04412.01
5.4.110.0340.08612.01
5.4.100.0220.03912.01
5.4.90.0190.03912.01
5.4.80.0290.05912.01
5.4.70.0130.04312.00
5.4.60.0170.04112.00
5.4.50.0150.04412.00
5.4.40.0130.04611.98
5.4.30.0140.04511.98
5.4.20.0160.04211.98
5.4.10.0160.04111.99
5.4.00.0130.04411.47
5.3.290.0070.04312.80
5.3.280.0060.04412.71
5.3.270.0130.04712.73
5.3.260.0130.04712.72
5.3.250.0300.09212.72
5.3.240.0160.04412.72
5.3.230.0170.04412.71
5.3.220.0190.04012.68
5.3.210.0160.04312.68
5.3.200.0200.03912.68
5.3.190.0200.04012.68
5.3.180.0180.04312.67
5.3.170.0210.03912.67
5.3.160.0270.06412.67
5.3.150.0190.04012.67
5.3.140.0170.04212.66
5.3.130.0110.04912.66
5.3.120.0120.05012.66
5.3.110.0190.04312.66
5.3.100.0140.04712.12
5.3.90.0160.04312.11
5.3.80.0130.04712.09
5.3.70.0240.06712.09
5.3.60.0110.05012.07
5.3.50.0120.04712.02
5.3.40.0160.04412.02
5.3.30.0320.08711.99
5.3.20.0130.04611.77
5.3.10.0160.04011.73
5.3.00.0180.03811.71
5.2.170.0140.0339.21
5.2.160.0130.0349.21
5.2.150.0150.0329.21
5.2.140.0140.0339.21
5.2.130.0100.0369.18
5.2.120.0110.0369.17
5.2.110.0140.0359.18
5.2.100.0230.0589.18
5.2.90.0190.0329.18
5.2.80.0150.0339.17
5.2.70.0180.0609.17
5.2.60.0120.0359.13
5.2.50.0170.0319.09
5.2.40.0110.0369.07
5.2.30.0130.0339.04
5.2.20.0160.0379.04
5.2.10.0170.0348.94
5.2.00.0140.0328.80
5.1.60.0160.0558.08
5.1.50.0110.0308.08
5.1.40.0120.0288.07
5.1.30.0120.0338.41
5.1.20.0150.0298.44
5.1.10.0090.0348.16
5.1.00.0100.0318.16
5.0.50.0180.0776.64
5.0.40.0090.0246.49
5.0.30.0080.0366.32
5.0.20.0060.0266.28
5.0.10.0090.0236.25
5.0.00.0100.0356.25
4.4.90.0060.0204.78
4.4.80.0090.0164.76
4.4.70.0080.0184.76
4.4.60.0060.0204.75
4.4.50.0090.0164.77
4.4.40.0090.0284.71
4.4.30.0040.0224.76
4.4.20.0070.0194.84
4.4.10.0250.0614.85
4.4.00.0090.0284.76
4.3.110.0110.0144.66
4.3.100.0070.0184.66
4.3.90.0080.0164.64
4.3.80.0090.0274.59
4.3.70.0060.0194.63
4.3.60.0070.0184.62
4.3.50.0060.0194.63
4.3.40.0050.0294.54
4.3.30.0050.0193.30
4.3.20.0060.0183.28
4.3.10.0030.0203.25
4.3.00.0000.01315.60

preferences:
74.41 ms | 401 KiB | 5 Q