3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $searchTerm = "ü"; $searchTerm2 = "&uuml;"; $replaceTerm = "%FC"; $test=array("${searchTerm}$searchTerm2/${searchTerm}_.${searchTerm}", "xay${searchTerm}", "asdasd/${searchTerm}.mp3", "${searchTerm}.", "blahahbasd${searchTerm}", "1234${searchTerm}1234"); foreach ($test as $t) echo "$t => " . preg_replace("/". preg_quote($searchTerm) . "/x", preg_quote($replaceTerm) , $t) . "\n";
based on 4QYGZ
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
ü&uuml;/ü_.ü => %FC&uuml;/%FC_.%FC xayü => xay%FC asdasd/ü.mp3 => asdasd/%FC.mp3 ü. => %FC. blahahbasdü => blahahbasd%FC 1234ü1234 => 1234%FC1234
Output for hhvm-3.10.0

Process exited with code 153.