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"); echo highlightString("R&ouml;per","r&ouml;per");

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.0101.99418.40
8.3.50.0171.98822.05
8.3.40.0131.99018.59
8.3.30.0071.99618.72
8.3.20.0071.99418.79
8.3.10.0101.99420.39
8.3.00.0002.00123.52
8.2.180.0071.99616.32
8.2.170.0101.99322.96
8.2.160.0101.99120.34
8.2.150.0032.00124.18
8.2.140.0002.00224.66
8.2.130.0031.99826.16
8.2.120.0031.99817.75
8.2.110.0031.99920.95
8.2.100.0101.99217.84
8.2.90.0031.99918.03
8.2.80.0002.00118.22
8.2.70.0071.99317.63
8.2.60.0071.99717.75
8.2.50.0002.00417.63
8.2.40.0002.00418.11
8.2.30.0071.99419.97
8.2.20.0032.00117.62
8.2.10.0002.00519.45
8.2.00.0101.99317.87
8.1.280.0071.99725.92
8.1.270.0101.98622.02
8.1.260.0031.99926.35
8.1.250.0071.99528.09
8.1.240.0031.99923.87
8.1.230.0101.99021.04
8.1.220.0032.00017.74
8.1.210.0141.96718.77
8.1.200.0101.99217.35
8.1.190.0031.99817.23
8.1.180.0101.99118.10
8.1.170.0032.00018.54
8.1.160.0002.00218.99
8.1.150.0071.99618.68
8.1.140.0071.99617.53
8.1.130.0031.99817.93
8.1.120.0002.00417.61
8.1.110.0031.99917.45
8.1.100.0002.00217.57
8.1.90.0002.00117.60
8.1.80.0101.99217.58
8.1.70.0031.99917.49
8.1.60.0031.99917.72
8.1.50.0071.99517.46
8.1.40.0171.98517.62
8.1.30.0002.00317.69
8.1.20.0071.99617.57
8.1.10.0071.99717.52
8.1.00.0031.99917.60
8.0.300.0031.99819.91
8.0.290.0002.00316.58
8.0.280.0002.00218.32
8.0.270.0002.00217.20
8.0.260.0002.00116.63
8.0.250.0031.99816.96
8.0.240.0002.00516.89
8.0.230.0031.99816.92
8.0.220.0031.99816.67
8.0.210.0002.00216.82
8.0.200.0031.99516.71
8.0.190.0031.99916.97
8.0.180.0031.99916.84
8.0.170.0071.99716.79
8.0.160.0131.98916.94
8.0.150.0331.95716.79
8.0.140.0301.96416.70
8.0.130.0131.98613.43
8.0.120.0002.00216.79
8.0.110.0032.00116.79
8.0.100.0071.99516.67
8.0.90.0002.00316.81
8.0.80.0101.98916.78
8.0.70.0071.99816.88
8.0.60.0002.00216.80
8.0.50.0071.99716.65
8.0.30.0131.98217.10
8.0.20.0161.99117.40
8.0.10.0071.99716.94
8.0.00.0401.94216.69
7.4.330.0050.00013.43
7.4.320.0030.00316.63
7.4.300.0030.00316.49
7.4.290.0020.00516.62
7.4.280.0000.00716.52
7.4.270.0030.00316.43
7.4.260.0000.00613.29
7.4.250.0000.00716.57
7.4.240.0030.00316.63
7.4.230.0000.00816.40
7.4.220.0090.00716.40
7.4.210.0100.00816.56
7.4.200.0030.00516.60
7.4.190.0000.00816.78
7.4.160.0060.00916.53
7.4.150.0130.00417.40
7.4.140.0050.01517.86
7.4.130.0110.00716.54
7.4.120.0120.00616.49
7.4.110.0100.00716.56
7.4.100.0100.01016.54
7.4.90.0160.00816.58
7.4.80.0130.00319.37
7.4.70.0030.01716.37
7.4.60.0100.00716.53
7.4.50.0030.00616.75
7.4.40.0080.00322.27
7.4.30.0160.00616.45
7.4.00.0080.00915.08
7.3.330.0050.00013.39
7.3.320.0050.00013.38
7.3.310.0000.00716.38
7.3.300.0030.00316.24
7.3.290.0120.00616.35
7.3.280.0120.00516.30
7.3.270.0130.00317.40
7.3.260.0100.00918.24
7.3.250.0060.01116.53
7.3.240.0090.00816.64
7.3.230.0080.00816.52
7.3.210.0070.01116.75
7.3.200.0090.01219.39
7.3.190.0210.00016.37
7.3.180.0060.01316.36
7.3.170.0080.00816.52
7.3.160.0090.00616.43
7.3.120.0100.00514.71
7.3.110.0070.00715.08
7.3.100.0030.01014.43
7.3.90.0100.00714.93
7.3.80.0070.00314.88
7.3.70.0060.00314.84
7.3.60.0030.01014.57
7.3.50.0030.00914.53
7.3.40.0080.00514.78
7.3.30.0070.00714.86
7.3.20.0040.00916.78
7.3.10.0060.00916.70
7.3.00.0100.00716.68
7.2.330.0000.01716.32
7.2.320.0070.01016.62
7.2.310.0080.01416.69
7.2.300.0060.01116.60
7.2.290.0110.00516.51
7.2.250.0100.01015.02
7.2.240.0060.01514.90
7.2.230.0070.00415.21
7.2.220.0030.01315.21
7.2.210.0030.01315.02
7.2.200.0080.00514.95
7.2.190.0120.00314.79
7.2.180.0030.01415.01
7.2.170.0000.01014.81
7.2.00.0080.00819.06
7.1.330.0000.01616.11
7.1.320.0060.00915.73
7.1.310.0070.00715.74
7.1.300.0000.01315.85
7.1.290.0070.00415.96
7.1.280.0030.00615.70
7.1.270.0000.01815.84
7.1.260.0070.00715.49
7.1.100.0030.00917.88
7.1.70.0070.00717.09
7.1.60.0070.01019.40
7.1.50.0150.00616.69
7.1.00.0070.06722.45
7.0.200.0070.00316.53
7.0.140.0000.07721.99
7.0.70.0000.08321.66
7.0.60.0000.08021.77
7.0.50.0000.06722.09
7.0.40.0070.08320.04
7.0.30.0030.08720.11
7.0.20.0030.08320.04
7.0.10.0000.08020.16
7.0.00.0070.08320.10
5.6.280.0130.06321.13
5.6.220.0070.04720.58
5.6.210.0030.08320.67
5.6.200.0100.06721.13
5.6.190.0070.08021.03
5.6.180.0000.09021.01
5.6.170.0070.06320.94
5.6.160.0070.05721.08
5.6.150.0070.05721.03
5.6.140.0030.06321.00
5.6.130.0070.08320.92
5.6.120.0100.07721.07
5.6.110.0000.06020.95
5.6.100.0030.05320.93
5.6.90.0000.06321.00
5.6.80.0030.05020.50
5.6.70.0130.05720.55
5.6.60.0030.08320.42
5.6.50.0000.05320.46
5.6.40.0030.07320.44
5.6.30.0030.08020.29
5.6.20.0070.06720.46
5.6.10.0070.07020.43
5.6.00.0030.05020.30
5.5.360.0030.07020.41
5.5.350.0000.07020.43
5.5.340.0070.05720.84
5.5.330.0030.08720.86
5.5.320.0070.08020.78
5.5.310.0030.06020.80
5.5.300.0030.08020.92
5.5.290.0130.04320.80
5.5.280.0070.08320.77
5.5.270.0000.04720.77
5.5.260.0030.05020.73
5.5.250.0070.08320.68
5.5.240.0000.07720.15
5.5.230.0000.08320.30
5.5.220.0030.08020.30
5.5.210.0030.08020.02
5.5.200.0170.04720.23
5.5.190.0000.08020.07
5.5.180.0070.05720.27
5.5.160.0100.05720.00
5.5.150.0070.08020.18
5.5.140.0100.07720.23
5.5.130.0100.06720.18
5.5.120.0130.05320.25
5.5.110.0030.08020.10
5.5.100.0070.04020.08
5.5.90.0100.07020.09
5.5.80.0030.04020.04
5.5.70.0100.07020.15
5.5.60.0070.07320.15
5.5.50.0000.08020.11
5.5.40.0030.07720.15
5.5.30.0070.07720.00
5.5.20.0030.05720.14
5.5.10.0000.07719.98
5.5.00.0100.04720.07
5.4.450.0070.08319.48
5.4.440.0070.08319.49
5.4.430.0030.05319.45
5.4.420.0070.05019.27
5.4.410.0100.07019.10
5.4.400.0030.07319.03
5.4.390.0030.08019.03
5.4.380.0030.08019.05
5.4.370.0070.04719.16
5.4.360.0070.08019.09
5.4.350.0030.04719.09
5.4.340.0000.08318.85
5.4.320.0000.07719.13
5.4.310.0030.05719.03
5.4.300.0000.08019.15
5.4.290.0070.06019.14
5.4.280.0000.08718.84
5.4.270.0070.07319.12
5.4.260.0030.07718.85
5.4.250.0100.06719.20
5.4.240.0030.04019.17
5.4.230.0100.07019.23
5.4.220.0070.07019.15
5.4.210.0070.06719.21
5.4.200.0030.07319.11
5.4.190.0070.07719.12
5.4.180.0070.06719.15
5.4.170.0130.07019.17
5.4.160.0100.07319.02
5.4.150.0000.08318.92
5.4.140.0070.07316.51
5.4.130.0030.06316.33
5.4.120.0000.05316.46
5.4.110.0070.04716.26
5.4.100.0000.06016.34
5.4.90.0070.06716.51
5.4.80.0030.06716.26
5.4.70.0000.07316.37
5.4.60.0030.04716.48
5.4.50.0100.06316.42
5.4.40.0000.07716.30
5.4.30.0100.06716.23
5.4.20.0000.07716.40
5.4.10.0030.07316.45
5.4.00.0000.07715.85
5.3.290.0030.07714.61
5.3.280.0030.05314.51
5.3.270.0070.07714.64
5.3.260.0030.05714.62
5.3.250.0030.07714.66
5.3.240.0070.07014.68
5.3.230.0030.07714.65
5.3.220.0030.07314.54
5.3.210.0070.07714.63
5.3.200.0070.07314.58
5.3.190.0030.07314.50
5.3.180.0030.07714.61
5.3.170.0000.08314.54
5.3.160.0000.07714.67
5.3.150.0030.07714.65
5.3.140.0070.07314.69
5.3.130.0070.04714.65
5.3.120.0030.08014.61
5.3.110.0070.07714.54
5.3.100.0030.07314.14
5.3.90.0070.06013.94
5.3.80.0030.04314.11
5.3.70.0030.06013.95
5.3.60.0030.04013.90
5.3.50.0000.07313.92
5.3.40.0000.07013.84
5.3.30.0030.07314.02
5.3.20.0030.06713.59
5.3.10.0100.04313.75
5.3.00.0030.05313.74
5.2.170.0100.04711.47
5.2.160.0030.06311.47
5.2.150.0000.04711.47
5.2.140.0030.03711.47
5.2.130.0030.05711.47
5.2.120.0030.05711.47
5.2.110.0030.06011.47
5.2.100.0100.05011.47
5.2.90.0030.06311.47
5.2.80.0030.06011.47
5.2.70.0030.04011.47
5.2.60.0030.04711.47
5.2.50.0030.04011.47
5.2.40.0070.06011.47
5.2.30.0000.06711.47
5.2.20.0000.06011.47
5.2.10.0030.06011.47
5.2.00.0030.06711.47
5.1.60.0000.04311.47
5.1.50.0070.05011.47
5.1.40.0000.04011.47
5.1.30.0000.05711.47
5.1.20.0070.05011.47
5.1.10.0000.04711.47
5.1.00.0030.03311.47
5.0.50.0000.04311.47
5.0.40.0030.04311.47
5.0.30.0030.06011.47
5.0.20.0030.03011.47
5.0.10.0000.04711.47
5.0.00.0070.06311.47
4.4.90.0000.04011.47
4.4.80.0000.02011.47
4.4.70.0030.03011.47
4.4.60.0000.03311.47
4.4.50.0000.02711.47
4.4.40.0000.04011.47
4.4.30.0000.03711.47
4.4.20.0030.03311.47
4.4.10.0000.03711.47
4.4.00.0000.03311.47
4.3.110.0000.04011.47
4.3.100.0030.02311.47
4.3.90.0000.03711.47
4.3.80.0070.02711.47
4.3.70.0030.03311.47
4.3.60.0030.03311.47
4.3.50.0030.03311.47
4.3.40.0000.05711.47
4.3.30.0000.03711.47
4.3.20.0000.03711.47
4.3.10.0070.03011.47
4.3.00.0030.03311.47

preferences:
42.84 ms | 401 KiB | 5 Q