3v4l.org

run code in 300+ PHP versions simultaneously
<?php function highlightString($highlightString,$string) { if(strlen($highlightString)>0 && strlen($string)>0) { $s = $highlightString; $rest = $string; $result = $string; do { $rest = stristr($rest,$s); $replace = substr($rest,0,strlen($s)); $result = str_replace($replace,"<span class='textHighlight'>{$replace}</span>",$result); $rest = substr($rest,strlen($s)); } while ($rest !== false); return $result; } return $string; } echo highlightString("M&ouml;hre","M&ouml;hre");

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.40.0071.99818.76
8.3.30.0071.99718.71
8.3.20.0032.00018.77
8.3.10.0002.00220.54
8.3.00.0032.00021.77
8.2.170.0071.99422.96
8.2.160.0032.00120.57
8.2.150.0071.99624.18
8.2.140.0071.99624.66
8.2.130.0031.99926.16
8.2.120.0031.99919.36
8.2.110.0032.00020.47
8.2.100.0031.99917.78
8.2.90.0032.00017.75
8.2.80.0032.00117.97
8.2.70.0002.00217.80
8.2.60.0031.99817.93
8.2.50.0031.98918.10
8.2.40.0032.00320.26
8.2.30.0071.99419.98
8.2.20.0001.99917.75
8.2.10.0071.99617.83
8.2.00.0031.99917.76
8.1.270.0031.99923.99
8.1.260.0031.99926.35
8.1.250.0032.00028.09
8.1.240.0032.00022.02
8.1.230.0201.98420.28
8.1.220.0031.99817.74
8.1.210.0071.99418.77
8.1.200.0071.99617.35
8.1.190.0032.00317.35
8.1.180.0032.00118.10
8.1.170.0002.00318.57
8.1.160.0002.00218.93
8.1.150.0002.00818.67
8.1.140.0101.99317.52
8.1.130.0071.99417.84
8.1.120.0032.00017.45
8.1.110.0071.99517.58
8.1.100.0071.99417.54
8.1.90.0032.00017.55
8.1.80.0002.00217.55
8.1.70.0002.00417.49
8.1.60.0071.99617.59
8.1.50.0031.99817.50
8.1.40.0002.00217.43
8.1.30.0002.00217.66
8.1.20.0071.99517.60
8.1.10.0032.00017.61
8.1.00.0071.99917.60
8.0.300.0002.00219.53
8.0.290.0032.01216.58
8.0.280.0002.00418.35
8.0.270.0101.99317.29
8.0.260.0032.00216.77
8.0.250.0071.99516.96
8.0.240.0071.99516.95
8.0.230.0002.00416.89
8.0.220.0032.00016.78
8.0.210.0002.00216.81
8.0.200.0271.97516.92
8.0.190.0031.99816.73
8.0.180.0002.00516.85
8.0.170.0032.00016.78
8.0.160.0032.00016.93
8.0.150.0031.99816.87
8.0.140.0071.99716.82
8.0.130.0101.98813.34
8.0.120.0032.00016.83
8.0.110.0071.99616.64
8.0.100.0032.00116.84
8.0.90.0031.99716.74
8.0.80.0101.98916.77
8.0.70.0071.99616.76
8.0.60.0031.99916.66
8.0.50.0031.99816.77
8.0.30.0101.99016.95
8.0.20.0181.98417.40
8.0.10.0071.99616.95
8.0.00.0191.87416.67
7.4.330.0060.00014.72
7.4.320.0000.00816.55
7.4.300.0000.00716.52
7.4.290.0080.00016.62
7.4.280.0000.00816.62
7.4.270.0030.00616.70
7.4.260.0000.00613.34
7.4.250.0000.00716.54
7.4.240.0040.00416.43
7.4.230.0020.00516.42
7.4.220.0150.00316.38
7.4.210.0080.00916.55
7.4.200.0000.00716.36
7.4.190.0030.00316.74
7.4.160.0100.00616.58
7.4.150.0130.00317.40
7.4.140.0130.00517.86
7.4.130.0120.01016.59
7.4.120.0110.00716.51
7.4.110.0100.00716.39
7.4.100.0070.01016.57
7.4.90.0000.01716.40
7.4.80.0030.01319.37
7.4.70.0070.01416.67
7.4.60.0090.01216.45
7.4.50.0000.00816.59
7.4.40.0030.01022.27
7.4.30.0140.00316.62
7.4.00.0040.01214.77
7.3.330.0000.00513.29
7.3.320.0030.00313.27
7.3.310.0000.00716.30
7.3.300.0030.00316.23
7.3.290.0070.00716.33
7.3.280.0080.01016.29
7.3.270.0030.01317.40
7.3.260.0100.00718.24
7.3.250.0120.00516.50
7.3.240.0090.00616.68
7.3.230.0190.00016.45
7.3.210.0060.01016.52
7.3.200.0030.01319.39
7.3.190.0130.00916.57
7.3.180.0100.00716.39
7.3.170.0040.01716.33
7.3.160.0130.00316.32
7.3.120.0100.00314.79
7.2.330.0110.00716.79
7.2.320.0130.00416.76
7.2.310.0070.01316.66
7.2.300.0140.00516.43
7.2.290.0080.01016.52
7.2.00.0060.00919.49
7.1.200.0060.00615.84
7.1.100.0000.01117.88
7.1.70.0040.00417.38
7.1.60.0140.01019.40
7.1.50.0070.01116.99
7.1.00.0070.06322.44
7.0.200.0030.00316.51
7.0.140.0070.07021.97
7.0.70.0030.05021.82
7.0.60.0030.05721.86
7.0.50.0000.07722.08
7.0.40.0030.08719.97
7.0.30.0000.06320.18
7.0.20.0030.07020.13
7.0.10.0100.07020.00
7.0.00.0030.04320.13
5.6.280.0000.07721.12
5.6.220.0000.08320.65
5.6.210.0030.08720.46
5.6.200.0100.07721.02
5.6.190.0030.08721.07
5.6.180.0070.07321.06
5.6.170.0130.07321.01
5.6.160.0030.06320.97
5.6.150.0100.04721.04
5.6.140.0000.07321.01
5.6.130.0030.08021.04
5.6.120.0030.04321.17
5.6.110.0100.09321.07
5.6.100.0070.08720.91
5.6.90.0100.08720.98
5.6.80.0030.07020.39
5.6.70.0070.08020.30
5.6.60.0030.07320.41
5.6.50.0000.07720.46
5.6.40.0070.08020.29
5.6.30.0070.08320.32
5.6.20.0070.07720.40
5.6.10.0100.07320.52
5.6.00.0000.07720.37
5.5.360.0030.06720.42
5.5.350.0030.08020.42
5.5.340.0200.06320.80
5.5.330.0030.09020.90
5.5.320.0070.07720.74
5.5.310.0030.07720.72
5.5.300.0100.08020.79
5.5.290.0070.07320.91
5.5.280.0030.08320.84
5.5.270.0130.07020.79
5.5.260.0070.05320.75
5.5.250.0130.07020.65
5.5.240.0130.04320.30
5.5.230.0000.08020.17
5.5.220.0000.08720.24
5.5.210.0000.05020.27
5.5.200.0100.07020.19
5.5.190.0000.07320.22
5.5.180.0100.05020.23
5.5.160.0000.07020.00
5.5.150.0070.04719.99
5.5.140.0070.08020.27
5.5.130.0030.06020.26
5.5.120.0000.06720.11
5.5.110.0000.06020.10
5.5.100.0030.07720.07
5.5.90.0030.07719.95
5.5.80.0030.07720.06
5.5.70.0100.07020.09
5.5.60.0200.06319.98
5.5.50.0030.06719.96
5.5.40.0030.08020.07
5.5.30.0030.08320.02
5.5.20.0000.08319.98
5.5.10.0070.07020.09
5.5.00.0030.07719.96
5.4.450.0000.08719.56
5.4.440.0070.03719.49
5.4.430.0100.07319.34
5.4.420.0100.06719.17
5.4.410.0030.07719.40
5.4.400.0070.06318.92
5.4.390.0030.08018.85
5.4.380.0070.07019.04
5.4.370.0000.08019.05
5.4.360.0000.08319.16
5.4.350.0170.04319.21
5.4.340.0100.06718.89
5.4.320.0000.06719.05
5.4.310.0030.05318.85
5.4.300.0000.07318.90
5.4.290.0100.06719.02
5.4.280.0030.06019.03
5.4.270.0030.05718.92
5.4.260.0030.06319.03
5.4.250.0030.07319.12
5.4.240.0030.07719.20
5.4.230.0030.04719.08
5.4.220.0000.06019.12
5.4.210.0000.06319.11
5.4.200.0070.07019.12
5.4.190.0000.08019.14
5.4.180.0070.05319.07
5.4.170.0000.08319.11
5.4.160.0100.06718.83
5.4.150.0030.08018.86
5.4.140.0030.08016.45
5.4.130.0030.05716.40
5.4.120.0030.07016.45
5.4.110.0000.05316.46
5.4.100.0030.06716.47
5.4.90.0070.03716.34
5.4.80.0070.06716.49
5.4.70.0070.06716.42
5.4.60.0030.03716.52
5.4.50.0130.04316.45
5.4.40.0070.07316.54
5.4.30.0000.04316.30
5.4.20.0000.07316.38
5.4.10.0030.07716.39
5.4.00.0000.03715.90
5.3.290.0030.05314.69
5.3.280.0030.07014.52
5.3.270.0030.05314.70
5.3.260.0030.07314.72
5.3.250.0070.06714.63
5.3.240.0070.06314.67
5.3.230.0030.07714.54
5.3.220.0000.05314.59
5.3.210.0070.04314.54
5.3.200.0000.08014.70
5.3.190.0000.07314.63
5.3.180.0070.07714.55
5.3.170.0030.05014.58
5.3.160.0100.07014.57
5.3.150.0000.07314.63
5.3.140.0070.05314.63
5.3.130.0070.05314.64
5.3.120.0070.03714.68
5.3.110.0000.04314.52
5.3.100.0030.07714.18
5.3.90.0070.06014.02
5.3.80.0030.07013.95
5.3.70.0000.08013.91
5.3.60.0000.07014.11
5.3.50.0030.04013.93
5.3.40.0000.07014.02
5.3.30.0030.07313.92
5.3.20.0030.07013.83
5.3.10.0030.05313.76
5.3.00.0000.06313.61
5.2.170.0070.05712.18
5.2.160.0070.05012.18
5.2.150.0000.06712.18
5.2.140.0100.05312.18
5.2.130.0030.06012.18
5.2.120.0030.05712.18
5.2.110.0070.05312.18
5.2.100.0070.06012.18
5.2.90.0030.05712.18
5.2.80.0070.05712.18
5.2.70.0070.05312.18
5.2.60.0000.06712.18
5.2.50.0000.04712.18
5.2.40.0000.03012.18
5.2.30.0030.05712.18
5.2.20.0070.06012.18
5.2.10.0030.06312.18
5.2.00.0000.05312.18
5.1.60.0000.05712.18
5.1.50.0030.05712.18
5.1.40.0000.05312.18
5.1.30.0000.06012.18
5.1.20.0000.06012.18
5.1.10.0000.05712.18
5.1.00.0030.05312.18
5.0.50.0070.04012.18
5.0.40.0000.04012.18
5.0.30.0070.06312.18
5.0.20.0000.04012.18
5.0.10.0030.02012.18
5.0.00.0000.03312.18
4.4.90.0030.03312.18
4.4.80.0000.02712.18
4.4.70.0000.02012.18
4.4.60.0030.02312.18
4.4.50.0030.03312.18
4.4.40.0000.05312.18
4.4.30.0030.03312.18
4.4.20.0000.03712.18
4.4.10.0000.03312.18
4.4.00.0000.05012.18
4.3.110.0000.03712.18
4.3.100.0000.03012.18
4.3.90.0000.02312.18
4.3.80.0000.05312.18
4.3.70.0070.02712.18
4.3.60.0000.03012.18
4.3.50.0000.03312.18
4.3.40.0000.05012.18
4.3.30.0030.03312.18
4.3.20.0000.04012.18
4.3.10.0000.03312.18
4.3.00.0000.03012.18

preferences:
48.93 ms | 400 KiB | 5 Q