3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '<url id="item" class="list-item" href="#">Item</url><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.3.60.0090.00616.63
8.3.50.0030.01016.40
8.3.40.0140.00418.45
8.3.30.0090.00618.59
8.3.20.0070.00020.34
8.3.10.0030.00621.87
8.3.00.0080.00017.54
8.2.180.0120.00618.41
8.2.170.0100.00722.96
8.2.160.0110.00420.46
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00020.52
8.2.120.0040.00426.35
8.2.110.0070.00321.04
8.2.100.0040.00717.78
8.2.90.0080.00019.17
8.2.80.0080.00018.04
8.2.70.0060.00317.61
8.2.60.0060.00318.04
8.2.50.0050.00318.10
8.2.40.0000.00822.11
8.2.30.0040.00421.04
8.2.20.0040.00418.12
8.2.10.0030.00518.04
8.2.00.0070.00018.12
8.1.280.0140.00725.92
8.1.270.0130.00720.57
8.1.260.0050.00226.35
8.1.250.0040.00428.09
8.1.240.0100.00022.14
8.1.230.0060.00617.83
8.1.220.0050.00317.74
8.1.210.0060.00318.77
8.1.200.0090.00017.38
8.1.190.0080.00017.11
8.1.180.0040.00418.10
8.1.170.0040.00418.55
8.1.160.0040.00418.91
8.1.150.0000.00720.73
8.1.140.0000.00719.59
8.1.130.0000.00818.88
8.1.120.0050.00317.54
8.1.110.0040.00417.44
8.1.100.0000.00717.36
8.1.90.0070.00017.36
8.1.80.0040.00417.34
8.1.70.0000.00717.43
8.1.60.0050.00317.50
8.1.50.0040.00417.43
8.1.40.0000.00717.43
8.1.30.0080.00017.66
8.1.20.0000.01017.73
8.1.10.0040.00417.38
8.1.00.0050.00317.41
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0030.00318.48
8.0.270.0040.00417.31
8.0.260.0000.00716.82
8.0.250.0060.00017.00
8.0.240.0070.00016.81
8.0.230.0070.00416.98
8.0.220.0030.00316.92
8.0.210.0040.00416.88
8.0.200.0000.00717.03
8.0.190.0040.00417.01
8.0.180.0040.00416.85
8.0.170.0030.00316.82
8.0.160.0050.00216.91
8.0.150.0050.00216.84
8.0.140.0000.00816.86
8.0.130.0000.00613.33
8.0.120.0050.00316.82
8.0.110.0000.00716.88
8.0.100.0050.00316.96
8.0.90.0000.00716.90
8.0.80.0150.00616.86
8.0.70.0050.00316.69
8.0.60.0000.00716.92
8.0.50.0030.00516.91
8.0.30.0100.00916.92
8.0.20.0090.01217.40
8.0.10.0040.00417.00
8.0.00.0080.01116.67
7.4.330.0050.00015.55
7.4.320.0080.00016.58
7.4.300.0000.00616.36
7.4.290.0000.00816.48
7.4.280.0040.00416.58
7.4.270.0000.00816.61
7.4.260.0000.00613.27
7.4.250.0080.00016.37
7.4.240.0030.00316.47
7.4.230.0060.00316.44
7.4.220.0090.00916.50
7.4.210.0100.00316.58
7.4.200.0040.00416.30
7.4.160.0050.01116.51
7.4.150.0100.00717.40
7.4.140.0120.00917.86
7.4.130.0030.01316.54
7.4.120.0080.01116.47
7.4.110.0130.00316.26
7.4.100.0190.00316.50
7.4.90.0070.01116.37
7.4.80.0060.00919.39
7.4.70.0060.01016.41
7.4.60.0120.00616.50
7.4.50.0020.01016.43
7.4.40.0060.01616.40
7.4.30.0060.01316.43
7.4.00.0060.00814.79
7.3.330.0050.00013.07
7.3.320.0000.00513.17
7.3.310.0000.00716.28
7.3.300.0000.00716.34
7.3.290.0070.01116.32
7.3.280.0090.00716.33
7.3.270.0120.00917.40
7.3.260.0130.00916.53
7.3.250.0110.00816.46
7.3.240.0090.01116.65
7.3.230.0050.01416.36
7.3.210.0070.01016.51
7.3.200.0110.00716.52
7.3.190.0070.00916.44
7.3.180.0060.01016.17
7.3.170.0110.00516.37
7.3.160.0100.00716.24
7.2.330.0120.00616.49
7.2.320.0170.01316.24
7.2.310.0140.00316.36
7.2.300.0130.00916.57
7.2.290.0000.01716.45
7.2.60.0080.00516.80
7.1.200.0030.00915.82
7.1.100.0030.00618.34
7.1.70.1200.01315.29
7.1.60.1970.02333.14
7.1.50.1230.01733.03
7.1.40.1300.01032.52
7.1.30.1230.01032.66
7.1.20.1270.01332.89
7.1.10.1030.00714.72
7.1.00.1270.00314.82
7.0.200.1300.01015.09
7.0.190.1230.01714.98
7.0.180.1130.01014.43
7.0.170.1230.01714.36
7.0.160.1130.01714.41
7.0.150.1070.01314.43
7.0.140.1200.01314.59
7.0.130.1070.00314.54
7.0.120.0930.01314.64
7.0.110.0970.01014.72
7.0.100.1000.01014.41
7.0.90.0870.01314.56
7.0.80.1070.01714.29
7.0.70.1130.01014.41
7.0.60.1000.01714.39
7.0.50.1100.00714.57
7.0.40.1070.01314.74
7.0.30.1130.00714.67
7.0.20.1000.01714.50
7.0.10.0970.01714.61
7.0.00.1100.00714.73

preferences:
44.67 ms | 400 KiB | 5 Q