3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '<url id="item" class="list-item" href="#">Item</url>'; $find = "url"; $lenght = strlen($find); $pos1 = strpos($s, $find); $pos2 = strrpos($s, $find); Echo substr($s,0,$pos1) . "a" . Substr($s,$pos1+$lenght,$pos2-$lenght-1) . "a" . Substr($s,$pos2+$lenght); //Echo str_replace(array("<li ", "</li>"), array("<a ", "</a>"), $s);

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.5.10.0110.00616.76
8.5.00.0120.00919.89
8.4.150.0010.00214.05
8.4.140.0120.01017.42
8.4.130.0080.01217.61
8.4.120.0120.00722.25
8.4.110.0100.00722.41
8.4.100.0080.01318.67
8.4.90.0090.01318.79
8.4.80.0050.00419.55
8.4.70.0050.00317.95
8.4.60.0090.01218.80
8.4.50.0110.01017.60
8.4.40.0140.00723.75
8.4.30.0120.00919.29
8.4.20.0110.00317.62
8.4.10.0070.00319.39
8.3.280.0110.00918.24
8.3.270.0110.00916.48
8.3.260.0080.00816.51
8.3.250.0100.01118.90
8.3.240.0090.00516.56
8.3.230.0130.00616.82
8.3.220.0130.00517.11
8.3.210.0120.00616.41
8.3.200.0040.00516.51
8.3.190.0100.00817.30
8.3.180.0100.00916.30
8.3.170.0090.00917.09
8.3.160.0150.00318.43
8.3.150.0120.00618.82
8.3.140.0120.00619.08
8.3.130.0000.00816.80
8.3.120.0060.00318.77
8.3.110.0160.00320.94
8.3.100.0060.00324.06
8.3.90.0070.00026.77
8.3.80.0060.00319.36
8.3.70.0030.01616.50
8.3.60.0110.00416.38
8.3.50.0090.01016.34
8.3.40.0140.00318.84
8.3.30.0110.00718.61
8.3.20.0040.00420.22
8.3.10.0000.00823.61
8.3.00.0030.00717.47
8.2.290.0140.00420.58
8.2.280.0070.00218.41
8.2.270.0110.00718.75
8.2.260.0070.00019.13
8.2.250.0060.00318.27
8.2.240.0060.00319.08
8.2.230.0080.00022.58
8.2.220.0050.00537.54
8.2.210.0040.00426.77
8.2.200.0090.00018.88
8.2.190.0070.01018.41
8.2.180.0070.01318.16
8.2.170.0100.00722.96
8.2.160.0100.00720.15
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0000.00820.52
8.2.120.0050.00326.35
8.2.110.0100.00020.35
8.2.100.0090.00317.68
8.2.90.0040.00419.04
8.2.80.0060.00318.01
8.2.70.0040.00717.50
8.2.60.0040.00417.93
8.2.50.0030.00618.10
8.2.40.0030.00522.30
8.2.30.0040.00420.89
8.2.20.0040.00417.95
8.2.10.0000.00717.99
8.2.00.0030.00517.98
8.1.330.0100.00921.93
8.1.320.0130.00718.28
8.1.310.0140.00416.80
8.1.300.0030.00618.38
8.1.290.0070.00330.84
8.1.280.0110.00425.92
8.1.270.0040.00423.64
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0000.00823.98
8.1.230.0070.00717.70
8.1.220.0050.00217.74
8.1.210.0080.00018.77
8.1.200.0090.00017.23
8.1.190.0100.00017.35
8.1.180.0040.00418.10
8.1.170.0000.00918.64
8.1.160.0000.00719.02
8.1.150.0000.00718.92
8.1.140.0050.00319.55
8.1.130.0000.00718.84
8.1.120.0030.00317.38
8.1.110.0030.00517.46
8.1.100.0070.00017.38
8.1.90.0050.00317.48
8.1.80.0070.00017.50
8.1.70.0030.00317.50
8.1.60.0080.00017.56
8.1.50.0090.00017.52
8.1.40.0040.00417.54
8.1.30.0040.00417.52
8.1.20.0040.00417.59
8.1.10.0040.00417.52
8.1.00.0050.00217.42
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0040.00418.45
8.0.270.0000.00717.14
8.0.260.0060.00016.82
8.0.250.0070.00016.95
8.0.240.0000.00716.89
8.0.230.0000.00716.83
8.0.220.0030.00316.81
8.0.210.0070.00016.88
8.0.200.0030.00316.94
8.0.190.0000.00816.98
8.0.180.0030.00316.82
8.0.170.0060.00316.98
8.0.160.0030.00316.86
8.0.150.0000.00716.86
8.0.140.0040.00416.81
8.0.130.0030.00313.26
8.0.120.0030.00616.90
8.0.110.0000.00716.88
8.0.100.0040.00417.01
8.0.90.0000.00716.89
8.0.80.0060.00916.88
8.0.70.0000.00716.88
8.0.60.0040.00416.80
8.0.50.0050.00216.96
8.0.30.0110.01117.01
8.0.20.0110.01217.40
8.0.10.0000.00716.84
8.0.00.0120.00617.00
7.4.330.0020.00215.55
7.4.320.0000.00716.43
7.4.300.0000.00616.62
7.4.290.0070.00016.57
7.4.280.0050.00316.60
7.4.270.0030.00416.57
7.4.260.0050.00013.16
7.4.250.0070.00016.46
7.4.240.0040.00416.54
7.4.230.0000.00616.44
7.4.220.0030.01516.43
7.4.210.0040.01316.48
7.4.200.0050.00216.55
7.4.160.0080.01016.58
7.4.150.0060.01217.40
7.4.140.0050.01617.86
7.4.130.0000.01916.45
7.4.120.0100.00716.47
7.4.110.0030.01316.50
7.4.100.0070.01316.68
7.4.90.0120.00616.34
7.4.80.0130.00319.39
7.4.70.0130.00316.46
7.4.60.0060.00916.61
7.4.50.0100.00316.56
7.4.40.0030.01616.43
7.4.30.0050.01416.60
7.4.00.0100.00314.65
7.3.330.0000.00513.16
7.3.320.0000.00613.06
7.3.310.0030.00316.42
7.3.300.0030.00316.31
7.3.290.0000.00716.22
7.3.280.0100.00616.33
7.3.270.0110.00517.40
7.3.260.0140.00516.49
7.3.250.0130.00816.26
7.3.240.0120.00516.54
7.3.230.0090.00916.44
7.3.210.0100.00616.34
7.3.200.0100.00716.46
7.3.190.0030.01316.45
7.3.180.0120.00316.62
7.3.170.0060.01516.61
7.3.160.0000.01516.24
7.2.330.0110.00716.49
7.2.320.0100.00716.68
7.2.310.0100.00716.78
7.2.300.0110.00616.39
7.2.290.0120.00416.67
7.2.60.0000.01416.59
7.2.00.0000.01319.28
7.1.200.0070.01015.77
7.1.100.0000.01318.04
7.1.70.2870.01015.11
7.1.60.1900.02033.01
7.1.50.2070.01033.05
7.1.40.1970.01332.44
7.1.30.2770.01732.55
7.1.20.1900.01732.79
7.1.10.1400.01314.71
7.1.00.1570.00314.83
7.0.200.2200.00714.68
7.0.190.2600.01014.69
7.0.180.1670.01314.42
7.0.170.2330.01314.40
7.0.160.2770.01014.52
7.0.150.1700.01014.33
7.0.140.1800.01714.47
7.0.130.1670.01014.70
7.0.120.1200.01014.65
7.0.110.1800.01314.73
7.0.100.1500.00714.39
7.0.90.1600.00714.68
7.0.80.1530.01314.63
7.0.70.1200.01014.71
7.0.60.1030.01014.39
7.0.50.1670.01014.44
7.0.40.1300.01314.68
7.0.30.1630.00714.69
7.0.20.1030.01314.63
7.0.10.1500.01014.50
7.0.00.2600.00714.59

preferences:
36.73 ms | 403 KiB | 5 Q