3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'fix me <a href="www.link.com">link</a> or fix me <a href="link.com">link</a> and fix me too <a href="http://link.com">link</a> and replace me with <a href="http://www.link.com>link</a>'; echo str_replace('www.www', 'www', str_replace('http://www.http://', 'http://www.', str_replace('a href="', 'a href="http://www.', $str)));

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.0140.00016.50
8.3.50.0140.00516.22
8.3.40.0120.00318.57
8.3.30.0140.00318.68
8.3.20.0050.00518.35
8.3.10.0060.00318.65
8.3.00.0060.00319.26
8.2.180.0070.01016.50
8.2.170.0060.00922.96
8.2.160.0040.01218.71
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0110.00026.16
8.2.120.0040.01121.12
8.2.110.0090.00019.14
8.2.100.0000.01117.72
8.2.90.0000.00817.75
8.2.80.0050.00318.64
8.2.70.0030.00617.50
8.2.60.0000.00917.61
8.2.50.0050.00317.93
8.2.40.0030.00619.35
8.2.30.0000.01017.60
8.2.20.0070.00317.62
8.2.10.0030.00617.60
8.2.00.0000.00817.50
8.1.280.0100.00725.92
8.1.270.0000.00823.99
8.1.260.0030.00526.35
8.1.250.0000.00728.09
8.1.240.0070.00323.90
8.1.230.0040.00820.93
8.1.220.0040.00418.51
8.1.210.0040.00419.16
8.1.200.0030.00617.35
8.1.190.0040.00417.22
8.1.180.0000.00818.10
8.1.170.0000.00717.62
8.1.160.0070.00218.98
8.1.150.0040.00418.57
8.1.140.0070.00017.44
8.1.130.0040.00419.20
8.1.120.0040.00417.29
8.1.110.0000.00717.30
8.1.100.0030.00417.32
8.1.90.0030.00317.39
8.1.80.0080.00017.39
8.1.70.0030.00317.36
8.1.60.0040.00417.53
8.1.50.0040.00417.30
8.1.40.0060.00317.45
8.1.30.0040.00417.50
8.1.20.0040.00417.57
8.1.10.0040.00417.46
8.1.00.0000.01117.50
8.0.300.0000.00919.84
8.0.290.0040.00417.15
8.0.280.0030.00318.49
8.0.270.0070.00017.19
8.0.260.0080.00016.77
8.0.250.0040.00416.95
8.0.240.0050.00216.95
8.0.230.0030.00516.88
8.0.220.0000.00716.86
8.0.210.0050.00216.80
8.0.200.0000.00716.76
8.0.190.0070.00016.95
8.0.180.0030.00616.85
8.0.170.0070.00016.77
8.0.160.0050.00316.82
8.0.150.0070.00016.82
8.0.140.0070.00416.76
8.0.130.0030.00313.25
8.0.120.0040.00416.77
8.0.110.0030.00316.86
8.0.100.0040.00416.73
8.0.90.0030.00316.70
8.0.80.0070.00816.77
8.0.70.0000.00816.90
8.0.60.0090.00016.79
8.0.50.0000.00816.86
8.0.30.0060.01316.77
8.0.20.0130.01316.93
8.0.10.0070.00016.98
8.0.00.0080.01316.64
7.4.330.0000.00513.04
7.4.320.0060.00016.40
7.4.300.0060.00016.35
7.4.290.0080.00016.43
7.4.280.0030.00716.51
7.4.270.0030.00516.39
7.4.260.0030.00313.23
7.4.250.0030.00516.55
7.4.240.0000.00716.55
7.4.230.0060.00316.66
7.4.220.0130.01416.55
7.4.210.0070.00716.38
7.4.200.0000.00716.42
7.4.190.0050.00316.61
7.4.160.0040.01116.17
7.4.150.0060.01216.65
7.4.140.0030.01616.27
7.4.130.0200.02516.34
7.4.120.0100.00716.48
7.4.110.0130.00616.58
7.4.100.0130.01016.51
7.4.90.0130.00616.56
7.4.80.0090.01519.39
7.4.70.0110.00516.52
7.4.60.0080.00816.46
7.4.50.0030.00616.42
7.4.40.0060.00616.45
7.4.30.0110.00516.59
7.4.00.0120.00514.85
7.3.330.0060.00013.08
7.3.320.0060.00012.95
7.3.310.0000.00715.96
7.3.300.0030.00316.24
7.3.290.0120.00916.18
7.3.280.0100.00516.10
7.3.270.0070.01116.29
7.3.260.0090.00916.30
7.3.250.0080.01216.32
7.3.240.0100.00616.20
7.3.230.0100.00616.43
7.3.210.0100.00616.15
7.3.200.0040.01316.20
7.3.190.0150.00416.19
7.3.180.0040.01116.11
7.3.170.0100.00516.39
7.3.160.0090.01216.50
7.3.120.0070.00914.62
7.3.110.0090.00614.53
7.3.100.0060.00914.55
7.3.90.0050.00514.54
7.3.80.0070.00714.43
7.3.70.0100.00314.69
7.3.60.0070.01014.65
7.3.50.0090.00314.43
7.3.40.0090.00614.74
7.3.30.0100.00614.54
7.3.20.0070.01116.57
7.3.10.0060.00316.52
7.3.00.0110.00316.71
7.2.330.0150.00316.53
7.2.320.0120.01116.56
7.2.310.0070.01316.63
7.2.300.0130.00716.38
7.2.290.0140.00716.57
7.2.250.0060.00615.14
7.2.240.0090.00614.79
7.2.230.0090.00614.52
7.2.220.0060.00315.04
7.2.210.0000.01414.53
7.2.200.0090.00615.01
7.2.190.0030.01414.88
7.2.180.0090.00614.68
7.2.170.0000.01814.98
7.2.60.0070.01016.84
7.2.00.0030.01019.42
7.1.330.0040.01115.63
7.1.320.0040.01115.58
7.1.310.0040.01215.84
7.1.300.0030.01015.39
7.1.290.0030.00915.50
7.1.280.0070.01015.70
7.1.270.0060.01215.83
7.1.260.0030.01015.40
7.1.200.0080.00615.64
7.1.70.0000.00817.09
7.1.60.0160.00919.30
7.1.50.0120.00916.89
7.1.00.0000.05322.32
7.0.200.0050.00316.69
7.0.140.0000.07722.04
7.0.60.0100.07719.92
7.0.50.0000.06717.78
7.0.40.0070.04020.30
7.0.30.0570.06320.26
7.0.20.0270.04020.04
7.0.10.0130.07720.16
7.0.00.0130.07320.08
5.6.280.0030.07320.85
5.6.210.0030.08020.50
5.6.200.0030.08318.12
5.6.190.0130.06020.77
5.6.180.3170.04020.49
5.6.170.0330.07020.38
5.6.160.0100.05020.37
5.6.150.0170.07018.09
5.6.140.0000.04318.19
5.6.130.0070.04718.14
5.6.120.0100.06721.02
5.6.110.0170.06721.00
5.6.100.0070.08021.10
5.6.90.0200.07021.11
5.6.80.0030.04720.38
5.6.70.4500.03720.52
5.5.350.0000.06720.38
5.5.340.0000.08018.02
5.5.330.0100.04720.07
5.5.320.0270.08020.34
5.5.310.0230.07020.23
5.5.300.0030.04017.91
5.5.290.0000.05318.00
5.5.280.0070.04720.73
5.5.270.0070.04020.72
5.5.260.0100.08720.75
5.5.250.0000.08720.56
5.5.240.0200.05320.34
5.4.450.0030.04719.50
5.4.440.0030.04319.40
5.4.430.0000.04319.32
5.4.420.0030.04019.40
5.4.410.0070.03319.35
5.4.400.0030.03719.09
5.4.390.0030.05019.14
5.4.380.0000.04019.12
5.4.370.0030.03719.04
5.4.360.0030.03719.18
5.4.350.0070.03319.18
5.4.340.0000.04319.12
5.4.320.0000.04019.05
5.4.310.0030.03718.92
5.4.300.0100.03018.91
5.4.290.0070.03318.79
5.4.280.0000.04318.93
5.4.270.0070.03318.91
5.4.260.0030.03719.07
5.4.250.0030.05019.17
5.4.240.0030.08019.11
5.4.230.0100.07019.17
5.4.220.0070.08018.78
5.4.210.0070.06319.08
5.4.200.0070.06319.17
5.4.190.0100.07019.14
5.4.180.0100.06018.95
5.4.170.0100.07718.78
5.4.160.0100.04019.06
5.4.150.0130.07019.15
5.4.140.0030.07716.25
5.4.130.0030.07016.43
5.4.120.0030.06716.37
5.4.110.0030.05016.25
5.4.100.0030.04016.40
5.4.90.0000.04016.31
5.4.80.0070.03316.24
5.4.70.0070.03316.34
5.4.60.0130.06316.30
5.4.50.0030.04716.38
5.4.40.0070.07716.35
5.4.30.0030.04716.12
5.4.20.0130.06716.12
5.4.10.0130.07016.27
5.4.00.0100.05715.93
5.3.290.0030.03714.59
5.3.280.0030.07314.54
5.3.270.0000.06014.52
5.3.260.0030.08014.52
5.3.250.0030.07014.53
5.3.240.0070.07714.52
5.3.230.0100.07314.68
5.3.220.0100.03014.50
5.3.210.0070.06314.46
5.3.200.0070.05014.53
5.3.190.0130.07314.50
5.3.180.0070.04314.53
5.3.170.0030.04014.65
5.3.160.0130.06314.35
5.3.150.0000.04314.52
5.3.140.0100.03014.43
5.3.130.0230.03314.52
5.3.120.0030.03714.51
5.3.110.0030.04314.64
5.3.100.0030.05013.96
5.3.90.0100.06713.97
5.3.80.0070.04313.84
5.3.70.0070.03313.96
5.3.60.0030.07313.82
5.3.50.0030.08013.87
5.3.40.0100.07013.91
5.3.30.0130.05313.83
5.3.20.0070.05013.53
5.3.10.0030.05713.59
5.3.00.0070.05013.73
5.2.170.0030.03010.96
5.2.160.0070.05011.04
5.2.150.0070.06011.11
5.2.140.0030.06311.08
5.2.130.0030.03011.00
5.2.120.0070.06311.09
5.2.110.0070.03711.09
5.2.100.0130.03711.00
5.2.90.0070.03311.11
5.2.80.0000.04011.03
5.2.70.0030.06310.95
5.2.60.0000.04311.02
5.2.50.0030.05310.98
5.2.40.0030.06310.92
5.2.30.0030.06310.82
5.2.20.0070.04011.13
5.2.10.0100.05310.87
5.2.00.0100.02710.70
5.1.60.0030.05310.00
5.1.50.0030.0239.89
5.1.40.0030.0439.88
5.1.30.0030.04010.36
5.1.20.0070.02310.36
5.1.10.0070.05310.06
5.1.00.0000.0509.97
5.0.50.0030.0278.52
5.0.40.0070.0238.45
5.0.30.0000.0378.28
5.0.20.0000.0408.25
5.0.10.0070.0438.13
5.0.00.0030.0638.21
4.4.90.0000.0178.13
4.4.80.0000.0178.13
4.4.70.0000.0378.13
4.4.60.0000.0278.13
4.4.50.0000.0208.13
4.4.40.0030.0538.13
4.4.30.0000.0208.13
4.4.20.0000.0238.13
4.4.10.0000.0278.13
4.4.00.0070.0308.13
4.3.110.0000.0308.13
4.3.100.0000.0408.13
4.3.90.0030.0138.13
4.3.80.0000.0508.13
4.3.70.0030.0278.13
4.3.60.0030.0338.13
4.3.50.0030.0338.13
4.3.40.0000.0438.13
4.3.30.0100.0138.13
4.3.20.0030.0338.13
4.3.10.0000.0408.13
4.3.00.0000.0378.13

preferences:
67.97 ms | 400 KiB | 5 Q