3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str="Look at this [website]{http://www.stackoverflow.com} or at this [page]{http://www.google.com}"; echo preg_replace('/\[(.*?)\]\{(.*?)\}/', "<a href='$2'>$1</a>", $str);

preferences:
48.74 ms | 402 KiB | 5 Q