3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "This is a #hashtag within some #awesometext."; $newText = preg_replace("/#(\w+)/", "<a href='category.php?tag=$1'>#$1</a>", $text);

preferences:
60.54 ms | 402 KiB | 5 Q