3v4l.org

run code in 300+ PHP versions simultaneously
<?php $keywords = ['test', 'value']; $replace = ['<span>test</span>', '<span>value</span>']; $string = 'Hello world. This is a test.'; $render = str_replace($keywords, $replace, $string); echo $render;

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.0080.00818.43
8.3.60.0210.00018.31
8.3.50.0140.00521.91
8.3.40.0090.00618.71
8.3.30.0060.00818.97
8.3.20.0030.00620.25
8.3.10.0080.00022.08
8.3.00.0040.00422.52
8.2.190.0110.00716.58
8.2.180.0040.01116.63
8.2.170.0110.00422.96
8.2.160.0070.00720.99
8.2.150.0150.00024.18
8.2.140.0050.00324.66
8.2.130.0120.00626.16
8.2.120.0090.00017.59
8.2.110.0100.00022.08
8.2.100.0080.00419.64
8.2.90.0030.00519.27
8.2.80.0080.00018.03
8.2.70.0000.00817.63
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00818.09
8.2.30.0000.00818.04
8.2.20.0070.00017.52
8.2.10.0050.00319.41
8.2.00.0050.00317.73
8.1.280.0070.01325.92
8.1.270.0050.00322.19
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0030.00623.82
8.1.230.0060.00619.23
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0070.00317.23
8.1.190.0080.00017.53
8.1.180.0000.00718.59
8.1.170.0000.00918.56
8.1.160.0030.00321.89
8.1.150.0000.00718.56
8.1.140.0030.00517.39
8.1.130.0030.00317.77
8.1.120.0000.00717.30
8.1.110.0000.00717.34
8.1.100.0030.00417.32
8.1.90.0000.00817.34
8.1.80.0000.00717.35
8.1.70.0080.00017.36
8.1.60.0040.00417.52
8.1.50.0040.00417.34
8.1.40.0040.00417.39
8.1.30.0060.00317.55
8.1.20.0040.00417.57
8.1.10.0040.00417.53
8.1.00.0050.00217.43
8.0.300.0000.00718.77
8.0.290.0070.00017.18
8.0.280.0000.00818.48
8.0.270.0000.00817.19
8.0.260.0040.00416.80
8.0.250.0060.00016.81
8.0.240.0080.00016.85
8.0.230.0030.00316.77
8.0.220.0000.00716.80
8.0.210.0030.00316.81
8.0.200.0000.00816.82
8.0.190.0090.00316.90
8.0.180.0030.00516.73
8.0.170.0040.00416.81
8.0.160.0040.00416.76
8.0.150.0050.00316.67
8.0.140.0070.00016.82
8.0.130.0030.00313.33
8.0.120.0040.00416.82
8.0.110.0070.00016.66
8.0.100.0040.00416.80
8.0.90.0000.00716.88
8.0.80.0140.00716.88
8.0.70.0000.00816.72
8.0.60.0030.00516.80
8.0.50.0000.00716.86
8.0.30.0110.00816.79
8.0.20.0110.00917.40
8.0.10.0000.00716.95
8.0.00.0140.00716.52
7.4.330.0000.00615.00
7.4.320.0000.00616.52
7.4.300.0030.00316.53
7.4.290.0030.00316.41
7.4.280.0030.00316.47
7.4.270.0030.00316.35
7.4.260.0030.00316.43
7.4.250.0000.00716.38
7.4.240.0050.00216.39
7.4.230.0030.00316.34
7.4.220.0100.00716.46
7.4.210.0070.00716.51
7.4.200.0070.00016.42
7.4.190.0050.00316.66
7.4.160.0040.01116.31
7.4.150.0070.01117.40
7.4.140.0080.01217.86
7.4.130.0120.00916.55
7.4.120.0100.00616.41
7.4.110.0060.01016.26
7.4.100.0030.01616.35
7.4.90.0030.01516.38
7.4.80.0060.01519.39
7.4.70.0090.00916.27
7.4.60.0100.00716.38
7.4.50.0000.00916.51
7.4.40.0120.00022.77
7.4.30.0140.00316.43
7.4.00.0060.00914.89
7.3.330.0020.00213.01
7.3.320.0000.00513.03
7.3.310.0030.00316.18
7.3.300.0040.00416.18
7.3.290.0150.00016.22
7.3.280.0100.00716.17
7.3.270.0110.00617.40
7.3.260.0070.01116.45
7.3.250.0100.00716.27
7.3.240.0120.00616.43
7.3.230.0090.00916.39
7.3.210.0080.00816.41
7.3.200.0070.01019.39
7.3.190.0030.01316.14
7.3.180.0150.00616.38
7.3.170.0100.00616.29
7.3.160.0060.01016.35
7.3.120.0080.00714.82
7.3.110.0050.01114.65
7.3.100.0050.01114.74
7.3.90.0070.00914.67
7.3.80.0050.00914.70
7.3.70.0080.00714.63
7.3.60.0050.00814.74
7.3.50.0050.00814.65
7.3.40.0050.00814.71
7.3.30.0040.01014.54
7.3.20.0060.00716.56
7.3.10.0080.00516.63
7.3.00.0050.01216.50
7.2.330.0070.01016.70
7.2.320.0090.00916.63
7.2.310.0070.01016.53
7.2.300.0040.01416.50
7.2.290.0060.01016.70
7.2.250.0140.00214.90
7.2.240.0050.01214.95
7.2.230.0070.00714.91
7.2.220.0090.00414.81
7.2.210.0080.00714.98
7.2.200.0090.00714.92
7.2.190.0030.01014.93
7.2.180.0040.00815.08
7.2.170.0000.01514.93
7.2.00.0030.01319.36
7.1.330.0080.00915.90
7.1.320.0060.00915.92
7.1.310.0070.01015.63
7.1.300.0070.00815.71
7.1.290.0050.00715.85
7.1.280.0080.00815.75
7.1.270.0080.00515.78
7.1.260.0030.00815.87
7.1.100.0030.00618.02
7.1.70.0070.00017.22
7.1.60.0100.01319.82
7.1.50.0130.01017.00
7.1.00.0030.07722.36
7.0.200.0060.00316.82
7.0.140.0070.06721.96
7.0.60.0130.07320.04
7.0.50.0100.05017.66
7.0.40.0170.07320.04
7.0.30.0270.04320.30
7.0.20.0130.04720.02
7.0.10.0100.08020.30
7.0.00.0070.08320.32
5.6.280.0130.06321.10
5.6.210.0100.06320.43
5.6.200.0130.08018.16
5.6.190.0030.05720.45
5.6.180.3230.04020.63
5.6.170.0400.06320.50
5.6.160.0030.04320.51
5.6.150.0100.05318.09
5.6.140.0130.07718.18
5.6.130.0130.04318.20
5.6.120.0030.04320.98
5.6.110.0000.05721.13
5.6.100.0070.06720.88
5.6.90.0070.08320.97
5.6.80.0030.05720.38
5.6.70.0400.06720.38
5.5.350.0370.05320.40
5.5.340.0100.03317.98
5.5.330.0200.04020.19
5.5.320.0400.07020.21
5.5.310.0330.06720.27
5.5.300.0100.07317.88
5.5.290.0030.06017.99
5.5.280.0070.05020.76
5.5.270.0070.06720.73
5.5.260.0200.07320.86
5.5.250.0130.08320.60
5.5.240.0300.05720.07
5.4.450.0430.06719.63
5.4.440.0130.05319.48
5.4.430.1000.05319.63
5.4.420.0870.06319.23
5.4.410.0930.04719.11
5.4.400.0830.05719.25
5.4.390.1000.05019.25
5.4.380.0200.06318.61
5.4.370.0000.04718.68
5.4.360.0030.04018.57
5.4.350.0050.03511.97
5.4.340.0070.03411.96
5.4.320.0050.04212.45
5.4.310.0060.04412.45
5.4.300.0050.04312.45
5.4.290.0040.04212.45
5.4.280.0050.03512.34
5.4.270.0070.04512.34
5.4.260.0200.05718.74
5.4.250.0070.06018.83
5.4.240.0070.07718.79
5.4.230.0130.04719.02
5.4.220.0100.07718.68
5.4.210.0070.07318.90
5.4.200.0170.05318.84
5.4.190.0070.05718.89
5.4.180.0130.04718.78
5.4.170.0130.07019.04
5.4.160.0070.05718.83
5.4.150.0000.07318.77
5.4.140.0170.05316.25
5.4.130.0130.05316.18
5.4.120.0070.05716.39
5.4.110.0100.05016.47
5.4.100.0100.05016.39
5.4.90.0130.04316.46
5.4.80.0070.05016.45
5.4.70.0170.05316.43
5.4.60.0100.05016.17
5.4.50.0070.07016.28
5.4.40.0170.05316.34
5.4.30.0100.06016.50
5.4.20.0130.05016.47
5.4.10.0100.05716.27
5.4.00.0000.05315.88
5.3.290.0060.04412.80
5.3.280.0130.05014.61
5.3.270.0030.06314.45
5.3.260.0100.05714.44
5.3.250.0130.05314.46
5.3.240.0130.05314.38
5.3.230.0100.05314.62
5.3.220.0130.05714.44
5.3.210.0070.08314.63
5.3.200.0070.06714.56
5.3.190.0030.06014.71
5.3.180.0200.06314.58
5.3.170.0030.06014.60
5.3.160.0100.05714.73
5.3.150.0200.04314.57
5.3.140.0170.04014.41
5.3.130.0100.05314.56
5.3.120.0130.05014.57
5.3.110.0130.07314.56
5.3.100.0030.05714.20
5.3.90.0130.06314.11
5.3.80.0030.05014.17
5.3.70.0130.04013.86
5.3.60.0100.04713.72
5.3.50.0070.04713.96
5.3.40.0030.06013.71
5.3.30.0070.05013.82
5.3.20.0070.06713.86
5.3.10.0100.06713.52
5.3.00.0000.06013.65
5.2.170.0030.04311.07
5.2.160.0030.04311.05
5.2.150.0130.04311.07
5.2.140.0070.06010.98
5.2.130.0070.05711.11
5.2.120.0000.04711.19
5.2.110.0170.03011.11
5.2.100.0130.05011.01
5.2.90.0030.05311.09
5.2.80.0070.04311.24
5.2.70.0070.05711.09
5.2.60.0100.05710.88
5.2.50.0070.05010.91
5.2.40.0100.04710.91
5.2.30.0100.04710.98
5.2.20.0030.04010.88
5.2.10.0100.05010.84
5.2.00.0070.03710.55
5.1.60.0070.0339.91
5.1.50.0030.04710.04
5.1.40.0030.03710.03
5.1.30.0070.05010.34
5.1.20.0000.05710.43
5.1.10.0030.03710.21
5.1.00.0070.0479.99
5.0.50.0070.0278.57
5.0.40.0030.0278.49
5.0.30.0030.0478.45
5.0.20.0000.0308.02
5.0.10.0030.0278.35
5.0.00.0100.0377.98
4.4.90.0030.0207.07
4.4.80.0030.0207.07
4.4.70.0100.0177.07
4.4.60.0070.0237.07
4.4.50.0030.0277.07
4.4.40.0130.0377.07
4.4.30.0030.0237.07
4.4.20.0030.0307.07
4.4.10.0030.0237.07
4.4.00.0130.0307.07
4.3.110.0000.0307.07
4.3.100.0030.0307.07
4.3.90.0030.0307.07
4.3.80.0030.0407.07
4.3.70.0030.0207.07
4.3.60.0000.0337.07
4.3.50.0030.0207.07
4.3.40.0030.0437.07
4.3.30.0070.0237.07
4.3.20.0000.0337.07
4.3.10.0000.0237.07
4.3.00.0170.0206.98

preferences:
37.45 ms | 401 KiB | 5 Q