3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div class="media_embed" height="qqq" width="www"> <a href="http://giphy.com/gifs/dancing">via GIPHY</a> <div class="media_embed" height="eee" width="rrr"> <a href="http://giphy.com/gifs/movie">via GIPHY</a>'; echo $html = preg_replace("/<a href=\"(.*)\">.*<\/a>/", "<figure><img src='$1' /></figure>", $html);

preferences:
26.47 ms | 404 KiB | 5 Q