3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function markAnchor($str) { return preg_replace('/(#([0-9]+))/','<a href="show.php?id=$2">$1</a>',$str); } echo markAnchor("take a look at #42");
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
take a look at <a href="show.php?id=42">#42</a>