3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = "M&ouml;hre"; $rest = "M&ouml;hre"; $result = "M&ouml;hre"; 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); echo $result;
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
<span class='textHighlight'>M&ouml;hre</span>