3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = 'foobarfoobarfoobarfoobar<center><a href="ciao"><img alt="" src="image.png" /></a></center>foobarfoobarfoobar!'; $image = preg_replace("/.*\<center\>\<a href=\"(.*)\"\>\<img alt=\"\" src=\"(.*)\" \/\>\<\/a\>\<\/center\>.*/", "$2", $string); echo $image;
Output for 4.3.0 - 7.1.0
image.png