3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = '%%ANCHOR%% is een %%LINK%%'; function replace_str($str) { $str = str_replace('%%ANCHOR%%', 'test', $str); $str = str_replace('%%LINK%%', 'link', $str); return $str; } echo replace_str($str);

preferences:
38.68 ms | 402 KiB | 5 Q