3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = '<div align="center"> <a href="/readphoto?url=http://mt0.haibao.cn/store/wm/bigfiles/201212/887FDCBFE9CB9BB681F4D5C544A885.jpg" target="_blank"><img src="http://mt0.haibao.cn/store/wm/bigfiles/201212/887FDCBFE9CB9BB681F4D5C544A885.jpg"/></a><br/><br/> <div align="center"> <strong><strong><a class="topic_a" href="/zhuanti/海报5周年/" target="_blank">海报时尚网5周年</a>主题活动“Share Your Fashion Moment” </strong><br/><strong> </strong><br/><strong> <strong><strong><strong>分享人:</strong></strong></strong></strong><a class="topic_a" href="/fashion/名模/" target="_blank">超模</a>赵磊 &nbsp;</strong> </div><strong><br/></strong> <div align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 赵磊的个性标签:满世界跑的“宅男”,不喜欢人多的环境,偶尔和朋友打打球;与品牌知名度比起来,更注重衣服的舒适和品质。<br/><br/><br/> </div> </div>'; //preg_match_all('/<\s*img(.*)rel=\"(.*)\" src=\"(.*)\"/isU', $html, $imageArr); //preg_match_all('/<\s*img(.*)src=\"(.*)\"\s*\/>/isU', $html, $imageArr); preg_match_all('/<\s*img(.*)src=\"(.*)\"\s*\/>/isU', $html, $imageArr); print_r($imageArr);
Output for 7.0.0 - 7.0.24, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.4, 8.3.6
Array ( [0] => Array ( [0] => <img src="http://mt0.haibao.cn/store/wm/bigfiles/201212/887FDCBFE9CB9BB681F4D5C544A885.jpg"/> ) [1] => Array ( [0] => ) [2] => Array ( [0] => http://mt0.haibao.cn/store/wm/bigfiles/201212/887FDCBFE9CB9BB681F4D5C544A885.jpg ) )
Output for 8.3.5
Warning: PHP Startup: Unable to load dynamic library 'sodium.so' (tried: /usr/lib/php/8.3.5/modules/sodium.so (libsodium.so.23: cannot open shared object file: No such file or directory), /usr/lib/php/8.3.5/modules/sodium.so.so (/usr/lib/php/8.3.5/modules/sodium.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Array ( [0] => Array ( [0] => <img src="http://mt0.haibao.cn/store/wm/bigfiles/201212/887FDCBFE9CB9BB681F4D5C544A885.jpg"/> ) [1] => Array ( [0] => ) [2] => Array ( [0] => http://mt0.haibao.cn/store/wm/bigfiles/201212/887FDCBFE9CB9BB681F4D5C544A885.jpg ) )

preferences:
186.42 ms | 402 KiB | 222 Q