3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = "<a href='asdafsdF'>imim</a>"; preg_match_all('#<a.*?href="([^<>]*?)\?img_id=(\d+)"\s*>((?<!href).)*<img.*?src="(.*?)"#i',$html,$outA);

preferences:
44.6 ms | 402 KiB | 5 Q