3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = '<li id="item" class="list-item" href="#">Item</li><li id="item" class="list-item" href="#">Item</li>'; $find = "li"; $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.0070.00716.50
8.3.50.0070.00716.11
8.3.40.0140.00318.84
8.3.30.0120.00318.65
8.3.20.0070.00020.04
8.3.10.0060.00321.80
8.3.00.0040.00417.74
8.2.180.0100.00718.41
8.2.170.0110.00318.96
8.2.160.0100.00722.96
8.2.150.0000.00725.66
8.2.140.0030.00524.66
8.2.130.0040.01222.30
8.2.120.0070.00026.35
8.2.110.0030.00619.39
8.2.100.0040.00717.78
8.2.90.0060.00318.84
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0080.00317.93
8.2.50.0000.00818.07
8.2.40.0060.00318.08
8.2.30.0030.00617.94
8.2.20.0030.00518.02
8.2.10.0030.00317.93
8.2.00.0050.00218.05
8.1.280.0070.00725.92
8.1.270.0060.00323.86
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00322.67
8.1.230.0070.00417.71
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0000.00917.35
8.1.190.0050.00317.23
8.1.180.0090.00318.10
8.1.170.0000.00818.48
8.1.160.0040.00418.93
8.1.150.0040.00420.73
8.1.140.0030.00619.51
8.1.130.0030.00319.00
8.1.120.0030.00517.45
8.1.110.0040.00417.50
8.1.100.0050.00217.45
8.1.90.0040.00417.49
8.1.80.0050.00217.50
8.1.70.0000.00717.48
8.1.60.0040.00417.56
8.1.50.0040.00417.55
8.1.40.0000.00817.36
8.1.30.0000.00917.70
8.1.20.0040.00417.66
8.1.10.0040.00417.41
8.1.00.0040.00417.33
8.0.300.0080.00018.77
8.0.290.0000.00816.75
8.0.280.0050.00318.40
8.0.270.0030.00316.88
8.0.260.0070.00016.88
8.0.250.0000.00716.95
8.0.240.0040.00416.98
8.0.230.0060.00316.91
8.0.220.0000.00716.89
8.0.210.0000.00716.89
8.0.200.0040.00416.84
8.0.190.0040.00416.98
8.0.180.0040.00716.78
8.0.170.0070.00016.84
8.0.160.0000.00716.85
8.0.150.0050.00216.70
8.0.140.0040.00416.87
8.0.130.0000.00613.35
8.0.120.0000.00816.83
8.0.110.0050.00316.75
8.0.100.0040.00416.76
8.0.90.0080.00016.92
8.0.80.0070.01016.82
8.0.70.0040.00416.95
8.0.60.0000.00816.79
8.0.50.0040.00416.88
8.0.30.0100.00817.18
8.0.20.0090.01117.40
8.0.10.0030.00316.99
8.0.00.0090.01216.66
7.4.330.0000.00515.55
7.4.320.0040.00416.50
7.4.300.0000.00716.52
7.4.290.0070.00416.43
7.4.280.0040.00416.60
7.4.270.0040.00416.59
7.4.260.0030.00313.25
7.4.250.0040.00416.47
7.4.240.0000.00716.63
7.4.230.0040.00416.19
7.4.220.0080.01616.47
7.4.210.0070.00716.39
7.4.200.0050.00316.54
7.4.160.0090.00916.51
7.4.150.0140.00517.40
7.4.140.0130.00717.86
7.4.130.0120.00416.44
7.4.120.0120.01016.38
7.4.110.0120.00616.30
7.4.100.0100.01316.36
7.4.90.0100.00716.54
7.4.80.0080.00819.39
7.4.70.0030.01316.48
7.4.60.0000.01616.48
7.4.50.0040.01116.37
7.4.40.0060.01116.52
7.4.30.0030.01716.32
7.4.00.0030.01414.99
7.3.330.0050.00013.08
7.3.320.0050.00013.20
7.3.310.0030.00616.25
7.3.300.0030.00316.27
7.3.290.0110.00516.29
7.3.280.0050.01116.32
7.3.270.0090.00917.40
7.3.260.0120.00616.43
7.3.250.0080.01016.45
7.3.240.0130.00516.51
7.3.230.0130.00816.55
7.3.210.0030.01316.42
7.3.200.0030.01216.25
7.3.190.0100.00716.34
7.3.180.0090.00616.59
7.3.170.0120.00916.21
7.3.160.0100.00616.39
7.3.120.0060.01214.76
7.3.110.0090.00914.93
7.3.100.0090.00614.75
7.3.90.0130.00014.73
7.3.80.0000.01014.73
7.3.70.0040.01114.62
7.3.60.0000.00814.79
7.3.50.0040.01114.73
7.3.40.0030.00914.58
7.3.30.0040.01114.71
7.3.20.0070.00716.63
7.3.10.0040.01216.36
7.3.00.0030.01016.52
7.2.330.0140.00316.77
7.2.320.0180.00016.74
7.2.310.0080.00916.70
7.2.300.0180.00016.36
7.2.290.0060.01216.68
7.2.250.0000.01414.89
7.2.240.0110.00615.11
7.2.230.0040.01414.82
7.2.220.0000.01514.88
7.2.210.0130.00314.90
7.2.200.0000.01414.95
7.2.190.0000.00914.84
7.2.180.0090.00014.93
7.2.170.0040.01115.11
7.2.60.0060.00917.00
7.2.00.0030.00619.03
7.1.330.0080.00815.79
7.1.320.0100.00715.71
7.1.310.0060.00615.57
7.1.300.0070.00715.66
7.1.290.0030.00715.48
7.1.280.0030.00615.63
7.1.270.0060.00915.79
7.1.260.0030.00915.45
7.1.200.0000.01415.90
7.1.100.0070.00718.02
7.1.70.1170.00715.38
7.1.60.1270.00733.29
7.1.50.1330.02032.86
7.1.40.1330.01032.77
7.1.30.1130.02032.50
7.1.20.1230.02032.74
7.1.10.1100.00714.88
7.1.00.1270.00714.77
7.0.200.1230.01014.97
7.0.190.1630.01014.98
7.0.180.1200.01014.43
7.0.170.1170.00714.14
7.0.160.1130.01314.33
7.0.150.1100.01714.28
7.0.140.1100.01314.55
7.0.130.1070.01014.55
7.0.120.1230.00714.59
7.0.110.1130.01714.28
7.0.100.1270.01014.37
7.0.90.1130.01714.55
7.0.80.1070.01314.54
7.0.70.1170.01714.59
7.0.60.1370.01014.11
7.0.50.1430.01014.58
7.0.40.1070.01314.68
7.0.30.1230.01014.60
7.0.20.1300.01314.62
7.0.10.1770.02014.50
7.0.00.1130.01014.50

preferences:
42.62 ms | 401 KiB | 5 Q