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;mer","R&ouml;mer");

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.0101.99518.71
8.3.30.0071.99718.62
8.3.20.0031.99918.60
8.3.10.0071.99420.53
8.3.00.0071.99721.73
8.2.170.0101.99022.96
8.2.160.0101.99320.43
8.2.150.0071.99624.18
8.2.140.0101.99324.66
8.2.130.0101.99226.16
8.2.120.0032.00019.36
8.2.110.0071.99621.05
8.2.100.0101.99817.59
8.2.90.0071.99419.09
8.2.80.0031.99718.03
8.2.70.0032.00417.75
8.2.60.0002.00317.80
8.2.50.0002.00418.07
8.2.40.0032.00018.16
8.2.30.0031.99919.89
8.2.20.0131.98817.62
8.2.10.0031.99919.54
8.2.00.0031.99717.76
8.1.270.0002.00123.99
8.1.260.0071.99626.35
8.1.250.0071.99528.09
8.1.240.0031.99922.52
8.1.230.0031.99920.91
8.1.220.0031.99717.74
8.1.210.0031.99918.88
8.1.200.0002.00617.36
8.1.190.0002.00517.39
8.1.180.0031.99918.10
8.1.170.0031.99718.89
8.1.160.0002.00018.98
8.1.150.0071.99418.79
8.1.140.0002.00217.54
8.1.130.0032.00018.00
8.1.120.0002.00117.57
8.1.110.0002.00317.58
8.1.100.0002.00217.50
8.1.90.0031.99817.54
8.1.80.0031.99817.57
8.1.70.0031.99917.52
8.1.60.0031.99817.70
8.1.50.0031.99917.46
8.1.40.0031.99717.60
8.1.30.0071.99717.68
8.1.20.0031.99917.55
8.1.10.0032.00017.57
8.1.00.0231.97917.57
8.0.300.0031.99319.74
8.0.290.0031.99816.62
8.0.280.0071.99418.39
8.0.270.0031.99717.22
8.0.260.0002.00116.78
8.0.250.0031.99816.93
8.0.240.0101.99116.93
8.0.230.0071.99616.96
8.0.220.0031.99816.70
8.0.210.0031.99816.79
8.0.200.0071.99516.84
8.0.190.0002.00216.88
8.0.180.0031.99816.76
8.0.170.0171.98216.88
8.0.160.0002.00216.96
8.0.150.0031.99816.75
8.0.140.0002.00216.72
8.0.130.0031.99913.35
8.0.120.0002.00216.70
8.0.110.0101.98816.84
8.0.100.0071.99616.69
8.0.90.0031.99916.66
8.0.80.0101.98716.84
8.0.70.0071.99416.67
8.0.60.0071.99516.63
8.0.50.0031.99816.73
8.0.30.0161.98417.00
8.0.20.0131.98917.40
8.0.10.0071.99516.85
8.0.00.0331.69116.53
7.4.330.0020.00214.72
7.4.320.0000.00616.67
7.4.300.0060.00016.50
7.4.290.0000.00716.56
7.4.280.0060.00316.46
7.4.270.0050.00516.54
7.4.260.0030.00313.32
7.4.250.0000.00716.47
7.4.240.0000.00716.38
7.4.230.0040.00416.61
7.4.220.0060.01016.46
7.4.210.0090.00816.50
7.4.200.0070.00016.71
7.4.190.0030.00316.53
7.4.160.0080.00816.71
7.4.150.0070.01017.40
7.4.140.0060.01117.86
7.4.130.0110.00716.49
7.4.120.0030.01816.53
7.4.110.0190.00316.53
7.4.100.0100.00716.66
7.4.90.0030.01416.54
7.4.80.0150.00419.37
7.4.70.0040.01716.49
7.4.60.0090.00616.45
7.4.50.0000.00916.54
7.4.40.0040.01222.27
7.4.30.0110.00816.54
7.4.10.0170.00315.02
7.4.00.0100.00915.07
7.3.330.0050.00013.39
7.3.320.0030.00313.28
7.3.310.0000.00716.31
7.3.300.0030.00316.19
7.3.290.0110.00516.31
7.3.280.0100.00616.31
7.3.270.0060.01017.40
7.3.260.0120.00518.24
7.3.250.0100.00916.48
7.3.240.0060.01016.59
7.3.230.0150.00316.39
7.3.210.0110.00516.33
7.3.200.0120.00919.39
7.3.190.0060.01316.24
7.3.180.0060.01016.36
7.3.170.0080.00816.38
7.3.160.0100.00716.54
7.3.130.0090.00914.86
7.3.120.0070.00914.78
7.3.110.0080.01114.68
7.3.100.0080.00814.69
7.3.90.0080.00614.92
7.3.80.0020.01214.86
7.3.70.0060.00614.82
7.3.60.0080.00714.73
7.3.50.0040.00814.57
7.3.40.0030.00714.77
7.3.30.0060.00614.78
7.3.20.0060.00816.55
7.3.10.0050.00716.63
7.3.00.0060.00516.61
7.2.330.0120.00616.43
7.2.320.0060.01616.60
7.2.310.0070.01116.54
7.2.300.0090.00716.74
7.2.290.0070.01116.73
7.2.260.0100.01015.05
7.2.250.0110.00714.84
7.2.240.0000.01615.18
7.2.230.0080.00614.95
7.2.220.0060.00915.00
7.2.210.0070.00715.01
7.2.200.0050.01014.94
7.2.190.0030.00815.04
7.2.180.0050.00815.05
7.2.170.0040.01215.01
7.2.160.0100.00714.96
7.2.150.0030.01016.91
7.2.140.0050.00816.85
7.2.130.0020.01116.68
7.2.120.0080.00616.78
7.2.110.0040.01116.80
7.2.100.0060.00616.98
7.2.90.0100.00316.80
7.2.80.0090.00916.83
7.2.70.0120.00516.90
7.2.60.0050.01116.88
7.2.50.0070.00816.87
7.2.40.0010.01016.86
7.2.30.0050.00916.72
7.2.20.0030.01016.93
7.2.10.0110.00616.89
7.2.00.0060.00916.81
7.1.330.0030.01115.91
7.1.320.0080.00416.03
7.1.310.0060.00615.69
7.1.300.0030.01015.86
7.1.290.0050.00615.69
7.1.280.0060.00815.71
7.1.270.0090.00415.77
7.1.260.0070.00715.96
7.1.250.0040.00615.87
7.1.240.0020.00715.95
7.1.230.0100.00615.80
7.1.220.0080.00415.88
7.1.210.0040.00915.66
7.1.200.0080.00715.84
7.1.190.0030.00915.66
7.1.180.0090.00415.82
7.1.170.0100.00215.63
7.1.160.0110.00615.58
7.1.150.0110.00315.68
7.1.140.0040.00615.70
7.1.130.0050.01115.87
7.1.120.0050.00615.78
7.1.110.0070.00515.90
7.1.100.0070.00915.86
7.1.90.0100.00515.57
7.1.80.0050.00515.88
7.1.70.0040.00616.18
7.1.60.0060.00817.00
7.1.50.0090.00916.09
7.1.40.0080.00715.92
7.1.30.0080.00715.88
7.1.20.0080.00415.85
7.1.10.0050.00715.82
7.1.00.0020.02118.02
7.0.330.0030.01215.37
7.0.320.0040.00815.39
7.0.310.0060.01015.30
7.0.300.0060.00615.46
7.0.290.0020.01315.15
7.0.280.0070.00715.47
7.0.270.0080.00715.07
7.0.260.0070.00615.30
7.0.250.0060.00715.26
7.0.240.0100.00515.31
7.0.230.0020.01115.21
7.0.220.0060.00515.46
7.0.210.0090.00715.27
7.0.200.0110.00515.93
7.0.190.0060.00515.54
7.0.180.0030.00815.05
7.0.170.0070.00515.34
7.0.160.0070.00415.43
7.0.150.0080.00615.23
7.0.140.0080.02617.55
7.0.130.0040.01115.36
7.0.120.0060.00415.33
7.0.110.0060.00815.21
7.0.100.0110.00815.23
7.0.90.0090.00715.22
7.0.80.0110.00115.19
7.0.70.0030.01817.39
7.0.60.0050.01817.54
7.0.50.0020.01917.61
7.0.40.0020.02515.58
7.0.30.0020.02115.48
7.0.20.0040.01615.66
7.0.10.0030.01915.49
7.0.00.0050.01615.58
5.6.400.0060.00914.41
5.6.390.0070.00714.22
5.6.380.0070.00714.43
5.6.370.0050.01014.21
5.6.360.0080.00514.38
5.6.350.0030.01114.15
5.6.340.0090.00314.46
5.6.330.0040.00914.04
5.6.320.0100.00514.21
5.6.310.0030.01314.23
5.6.300.0130.00514.40
5.6.290.0100.00314.37
5.6.280.0050.02816.49
5.6.270.0050.00714.38
5.6.260.0080.00514.11
5.6.250.0060.00714.29
5.6.240.0050.00614.27
5.6.230.0050.00914.31
5.6.220.0020.02416.41
5.6.210.0040.01816.39
5.6.200.0070.01816.57
5.6.190.0060.01816.69
5.6.180.0020.02016.65
5.6.170.0040.01716.50
5.6.160.0030.01916.62
5.6.150.0050.01816.55
5.6.140.0070.03116.41
5.6.130.0060.03116.61
5.6.120.0060.02116.56
5.6.110.0060.03416.67
5.6.100.0030.03316.54
5.6.90.0050.03616.50
5.6.80.0090.02516.36
5.6.70.0040.03116.29
5.6.60.0060.02916.20
5.6.50.0030.03316.29
5.6.40.0040.03216.23
5.6.30.0030.02516.16
5.6.20.0030.02416.19
5.6.10.0060.01616.26
5.6.00.0030.03416.31
5.5.380.0080.00512.85
5.5.370.0050.00812.72
5.5.360.0040.02415.18
5.5.350.0050.02115.21
5.5.340.0050.01415.45
5.5.330.0050.01715.38
5.5.320.0050.01815.29
5.5.310.0040.01915.44
5.5.300.0040.02315.46
5.5.290.0060.02815.47
5.5.280.0020.03515.34
5.5.270.0080.03215.39
5.5.260.0030.03515.20
5.5.250.0080.03015.29
5.5.240.0060.02615.06
5.5.230.0040.02915.25
5.5.220.0030.02814.95
5.5.210.0060.02715.24
5.5.200.0040.02815.03
5.5.190.0070.02115.11
5.5.180.0070.03015.05
5.5.170.0080.00612.33
5.5.160.0020.03415.08
5.5.150.0020.03215.21
5.5.140.0050.02615.07
5.5.130.0070.03015.22
5.5.120.0030.02715.07
5.5.110.0060.01715.16
5.5.100.0050.02414.95
5.5.90.0020.02314.92
5.5.80.0060.02515.20
5.5.70.0050.02715.08
5.5.60.0030.03114.97
5.5.50.0030.02814.97
5.5.40.0050.03014.99
5.5.30.0070.02815.07
5.5.20.0030.02115.17
5.5.10.0050.03014.93
5.5.00.0040.03214.98
5.4.450.0050.02513.69
5.4.440.0060.02813.91
5.4.430.0030.03113.97
5.4.420.0060.02713.96
5.4.410.0070.02613.79
5.4.400.0030.03013.67
5.4.390.0100.02213.56
5.4.380.0030.02813.68
5.4.370.0030.03013.71
5.4.360.0040.01813.72
5.4.350.0090.02413.60
5.4.340.0060.02913.72
5.4.330.0080.00410.89
5.4.320.0040.01813.69
5.4.310.0060.02013.73
5.4.300.0080.02413.53
5.4.290.0060.02713.71
5.4.280.0050.03113.55
5.4.270.0050.02613.63
5.4.260.0030.02913.62
5.4.250.0070.02313.59
5.4.240.0050.02613.54
5.4.230.0040.02413.52
5.4.220.0040.02913.57
5.4.210.0020.02213.53
5.4.200.0020.02813.53
5.4.190.0060.02713.68
5.4.180.0010.03313.55
5.4.170.0050.02613.67
5.4.160.0020.03113.66
5.4.150.0060.02513.50
5.4.140.0000.02812.77
5.4.130.0010.03412.62
5.4.120.0020.02212.74
5.4.110.0020.03012.77
5.4.100.0020.02812.63
5.4.90.0040.02712.76
5.4.80.0050.02112.79
5.4.70.0030.02412.75
5.4.60.0030.02512.76
5.4.50.0050.02112.75
5.4.40.0040.01812.90
5.4.30.0010.02912.74
5.4.20.0020.01612.67
5.4.10.0050.02612.74
5.4.00.0030.03012.59
5.3.290.0100.02511.98
5.3.280.0020.02911.95
5.3.270.0050.02811.96
5.3.260.0050.02511.86
5.3.250.0030.03011.84
5.3.240.0010.03111.82
5.3.230.0050.02911.88
5.3.220.0060.02411.71
5.3.210.0050.02811.66
5.3.200.0040.02911.84
5.3.190.0020.02711.80
5.3.180.0050.02611.86
5.3.170.0020.02711.90
5.3.160.0040.02211.91
5.3.150.0030.02611.88
5.3.140.0030.02711.87
5.3.130.0030.02711.73
5.3.120.0040.02011.82
5.3.110.0060.01711.83
5.3.100.0010.03211.71
5.3.90.0060.02811.78
5.3.80.0030.01711.63
5.3.70.0040.01611.58
5.3.60.0040.02611.78
5.3.50.0040.02811.49
5.3.40.0010.03011.57
5.3.30.0040.02311.67
5.3.20.0090.02211.55
5.3.10.0030.02711.50
5.3.00.0070.01811.41
5.2.170.0100.02811.06
5.2.160.0030.03311.05
5.2.150.0030.03211.08
5.2.140.0040.03111.05
5.2.130.0020.02011.00
5.2.120.0020.03011.04
5.2.110.0030.03111.04
5.2.100.0030.03111.10
5.2.90.0040.03210.90
5.2.80.0030.02510.83
5.2.70.0030.02310.98
5.2.60.0030.02010.94
5.2.50.0020.01910.96
5.2.40.0010.02810.91
5.2.30.0030.01810.91
5.2.20.0020.01910.94
5.2.10.0020.02810.87
5.2.00.0030.03310.78
5.1.60.0020.03010.52
5.1.50.0070.02510.55
5.1.40.0040.02510.44
5.1.30.0100.02210.70
5.1.20.0090.02210.50
5.1.10.0050.02810.59
5.1.00.0030.02710.51
5.0.50.0030.02210.11
5.0.40.0030.02210.11
5.0.30.0020.03710.11
5.0.20.0060.02010.11
5.0.10.0030.02010.11
5.0.00.0060.02610.11
4.4.90.0030.01210.11
4.4.80.0030.01210.11
4.4.70.0030.01810.11
4.4.60.0030.01810.11
4.4.50.0030.01510.11
4.4.40.0040.02510.11
4.4.30.0050.01510.11
4.4.20.0000.02310.11
4.4.10.0000.01910.11
4.4.00.0020.02310.11
4.3.110.0040.01910.11
4.3.100.0040.01710.11
4.3.90.0020.01810.11
4.3.80.0030.02210.11
4.3.70.0020.01510.11
4.3.60.0030.01810.11
4.3.50.0070.01710.11
4.3.40.0010.02410.11
4.3.30.0020.02210.11
4.3.20.0040.01510.11
4.3.10.0010.01610.11
4.3.00.0030.01310.11

preferences:
55.47 ms | 400 KiB | 5 Q