3v4l.org

run code in 300+ PHP versions simultaneously
<?php function str_replace_word($needle,$replacement,$haystack){ $pattern = "/\b$needle\b/i"; $haystack = preg_replace($pattern, $replacement, $haystack); return $haystack; } echo print_r(str_replace_word('ann@ibbeck.de','kan',"ann@ibbeck.de,Petermann@ibbeck.de"),true); ?>

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.0040.01118.53
8.3.50.0060.01122.03
8.3.40.0110.00718.82
8.3.30.0080.00619.08
8.3.20.0040.00420.34
8.3.10.0080.00023.54
8.3.00.0040.00419.51
8.2.180.0120.00618.42
8.2.170.0070.00722.96
8.2.160.0130.00020.29
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00422.08
8.2.110.0060.00322.31
8.2.100.0040.00717.91
8.2.90.0110.00017.50
8.2.80.0060.00317.97
8.2.70.0110.00017.79
8.2.60.0090.00018.09
8.2.50.0040.00418.10
8.2.40.0030.00521.02
8.2.30.0040.00418.04
8.2.20.0040.00417.75
8.2.10.0000.00717.98
8.2.00.0000.00717.81
8.1.280.0140.00725.92
8.1.270.0080.00023.76
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00623.97
8.1.230.0000.01220.94
8.1.220.0060.00317.74
8.1.210.0080.00018.77
8.1.200.0040.00917.36
8.1.190.0030.00517.36
8.1.180.0080.00018.10
8.1.170.0000.00818.78
8.1.160.0000.00722.02
8.1.150.0060.00318.73
8.1.140.0040.00417.64
8.1.130.0030.00317.88
8.1.120.0040.00417.57
8.1.110.0050.00517.50
8.1.100.0050.00217.41
8.1.90.0000.00817.46
8.1.80.0030.00317.55
8.1.70.0000.00717.39
8.1.60.0000.00917.67
8.1.50.0090.00017.46
8.1.40.0040.00417.55
8.1.30.0050.00317.75
8.1.20.0040.00417.80
8.1.10.0040.00417.69
8.1.00.0040.00417.55
8.0.300.0080.00021.59
8.0.290.0040.00416.88
8.0.280.0030.00318.47
8.0.270.0000.00717.19
8.0.260.0070.00017.23
8.0.250.0030.00317.07
8.0.240.0000.00717.08
8.0.230.0040.00417.02
8.0.220.0040.00417.04
8.0.210.0000.00717.08
8.0.200.0000.00717.09
8.0.190.0000.00817.13
8.0.180.0040.00417.09
8.0.170.0040.00417.07
8.0.160.0040.00417.15
8.0.150.0040.00416.98
8.0.140.0050.00317.02
8.0.130.0000.00613.42
8.0.120.0000.00816.89
8.0.110.0030.00517.01
8.0.100.0000.00817.04
8.0.90.0040.00417.08
8.0.80.0060.01516.96
8.0.70.0000.00716.83
8.0.60.0000.00716.91
8.0.50.0040.00416.88
8.0.30.0120.00817.29
8.0.20.0100.00917.40
8.0.10.0030.00517.04
8.0.00.0110.00717.10
7.4.330.0050.00015.04
7.4.320.0030.00316.75
7.4.300.0000.00616.70
7.4.290.0000.00616.80
7.4.280.0000.00716.59
7.4.270.0020.00516.72
7.4.260.0040.00416.81
7.4.250.0040.00416.62
7.4.240.0020.00516.75
7.4.230.0000.00716.71
7.4.220.0060.01216.74
7.4.210.0100.00516.76
7.4.200.0030.00316.75
7.4.190.0030.00316.85
7.4.160.0100.00616.37
7.4.150.0060.01217.40
7.4.140.0030.01417.86
7.4.130.0110.00916.72
7.4.120.0110.00716.54
7.4.110.0060.01616.49
7.4.100.0090.00916.50
7.4.90.0070.01116.83
7.4.80.0170.00619.39
7.4.70.0100.00716.56
7.4.60.0120.00616.63
7.4.50.0030.00616.71
7.4.40.0070.01116.74
7.4.30.0060.01016.65
7.4.00.0070.00715.11
7.3.330.0000.00713.44
7.3.320.0000.00513.31
7.3.310.0000.00716.41
7.3.300.0050.00216.42
7.3.290.0000.01416.50
7.3.280.0110.00816.46
7.3.270.0120.00617.40
7.3.260.0060.01216.41
7.3.250.0090.01016.64
7.3.240.0120.00616.44
7.3.230.0100.00616.86
7.3.210.0070.01016.58
7.3.200.0120.00919.39
7.3.190.0110.00716.53
7.3.180.0120.00316.72
7.3.170.0060.00916.48
7.3.160.0100.00716.61
7.3.120.0080.00015.35
7.3.10.0120.00916.19
7.3.00.0120.00916.82
7.2.330.0060.01216.98
7.2.320.0000.01516.84
7.2.310.0080.00816.70
7.2.300.0090.00916.79
7.2.290.0040.01316.92
7.2.130.0080.00816.54
7.2.120.0110.00716.62
7.2.110.0220.00316.62
7.2.100.0040.01316.34
7.2.90.0130.01016.52
7.2.80.0130.00016.61
7.2.70.0060.00616.46
7.2.60.0120.00316.82
7.2.50.0090.00516.80
7.2.40.0060.00916.56
7.2.30.0070.01016.61
7.2.20.0030.01016.56
7.2.10.0060.00616.52
7.2.00.0070.00717.05
7.1.250.0080.00415.77
7.1.200.0040.01116.09
7.1.70.0000.00717.51
7.1.60.0150.00919.46
7.1.50.0190.00617.33
7.1.00.0000.07722.41
7.0.200.0080.00016.93
7.0.140.0070.07022.18
7.0.60.0170.06719.98
7.0.50.0000.05017.96
7.0.40.0030.08320.07
7.0.30.0300.08320.28
7.0.20.0200.04320.09
7.0.10.0000.06720.09
7.0.00.0130.07320.08
5.6.210.0100.03320.52
5.6.200.0070.08318.25
5.6.190.0070.04020.48
5.6.180.0270.07020.54
5.6.170.0300.07320.51
5.6.160.0130.07020.62
5.6.150.0100.04318.11
5.6.140.0130.07318.18
5.6.130.0070.08018.27
5.6.120.0000.05321.00
5.6.110.0030.08020.97
5.6.100.0100.08020.96
5.6.90.0130.07721.13
5.6.80.0200.06720.40
5.5.350.0400.07020.34
5.5.340.0070.08017.98
5.5.330.0070.08720.25
5.5.320.0100.05720.30
5.5.310.0170.07020.36
5.5.300.0100.07718.07
5.5.290.0070.05017.98
5.5.280.0070.05020.78
5.5.270.0130.07020.80
5.5.260.0070.07720.76
5.5.250.0070.08020.62
5.5.240.0130.07720.19
5.4.450.0330.04319.45
5.4.440.0200.05719.58
5.4.430.0170.06319.48
5.4.420.0170.05019.58
5.4.410.0230.05019.07
5.4.400.0200.04719.26
5.4.390.0100.06019.02
5.4.380.0130.05318.56
5.4.370.0130.05018.70
5.4.360.0200.04718.84
5.4.350.0200.04718.82
5.4.340.0100.05718.74
5.4.320.0040.03812.50
5.4.310.0070.03812.50
5.4.300.0090.03712.50
5.4.290.0070.03712.49
5.4.280.0070.03412.39
5.4.270.0050.03712.39
5.4.260.0070.05912.39
5.4.250.0110.05512.40
5.4.240.0080.04712.39
5.4.230.0060.03912.39
5.4.220.0050.03712.39
5.4.210.0060.03612.38
5.4.200.0090.03612.39
5.4.190.0040.04312.38
5.4.180.0060.03712.39
5.4.170.0080.03412.39
5.4.160.0040.03712.39
5.4.150.0040.03812.38
5.4.140.0060.05412.07
5.4.130.0090.03312.05
5.4.120.0070.03512.02
5.4.110.0060.04112.01
5.4.100.0090.03512.01
5.4.90.0050.03912.01
5.4.80.0060.04212.01
5.4.70.0080.04212.00
5.4.60.0070.05012.00
5.4.50.0080.05112.00
5.4.40.0040.03811.99
5.4.30.0060.03611.99
5.4.20.0060.05111.99
5.4.10.0110.05311.99
5.4.00.0080.04311.48
5.3.290.0100.04412.80
5.3.280.0090.04712.70
5.3.270.0100.04612.72
5.3.260.0080.04512.72
5.3.250.0060.03712.72
5.3.240.0100.03312.72
5.3.230.0090.04212.71
5.3.220.0050.04012.68
5.3.210.0050.04112.68
5.3.200.0080.03612.68
5.3.190.0040.04512.68
5.3.180.0080.03612.68
5.3.170.0070.03812.67
5.3.160.0050.03712.68
5.3.150.0070.03812.67
5.3.140.0120.03612.66
5.3.130.0080.04012.66
5.3.120.0100.03612.66
5.3.110.0030.04612.66
5.3.100.0050.04112.14
5.3.90.0100.03612.12
5.3.80.0050.03712.11
5.3.70.0050.04112.11
5.3.60.0020.04412.09
5.3.50.0070.03912.04
5.3.40.0070.03812.04
5.3.30.0080.04711.99
5.3.20.0120.04311.77
5.3.10.0080.04911.74
5.3.00.0080.05411.73
5.2.170.0020.0489.23
5.2.160.0070.0409.23
5.2.150.0030.0469.23
5.2.140.0060.0439.23
5.2.130.0060.0339.19
5.2.120.0090.0279.19
5.2.110.0030.0389.20
5.2.100.0070.0319.19
5.2.90.0090.0359.18
5.2.80.0050.0319.18
5.2.70.0120.0329.18
5.2.60.0080.0349.14
5.2.50.0090.0279.11
5.2.40.0050.0299.09
5.2.30.0070.0279.06
5.2.20.0030.0309.05
5.2.10.0010.0328.95
5.2.00.0060.0288.81
5.1.60.0010.0278.09
5.1.50.0060.0248.09
5.1.40.0050.0258.07
5.1.30.0040.0368.42
5.1.20.0060.0368.43
5.1.10.0060.0298.17
5.1.00.0060.0278.16
5.0.50.0190.0156.64
5.0.40.0040.0276.50
5.0.30.0060.0336.31
5.0.20.0060.0276.29
5.0.10.0060.0296.27
5.0.00.0060.0396.25
4.4.90.0050.0194.77
4.4.80.0020.0164.76
4.4.70.0030.0154.76
4.4.60.0030.0154.75
4.4.50.0040.0154.77
4.4.40.0050.0244.71
4.4.30.0040.0144.76
4.4.20.0050.0144.84
4.4.10.0030.0154.84
4.4.00.0060.0224.76
4.3.110.0000.0194.67
4.3.100.0080.0134.66
4.3.90.0040.0154.63
4.3.80.0030.0274.58
4.3.70.0030.0194.63
4.3.60.0040.0194.63
4.3.50.0030.0154.63
4.3.40.0040.0234.54
4.3.30.0030.0153.30
4.3.20.0050.0133.28
4.3.10.0020.0163.25
4.3.00.0030.0237.55

preferences:
55.39 ms | 401 KiB | 5 Q