3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $pat="|<img.?src=\'\"[\'\"].?>|i"; $content = <<< LOL <img src="http://img.dewen.org/upload/avatar/010/128/696/user_10128696_avatar_1384404591_r.png" id="top_avatar"> <span class="name" title="mdep, mga_dependent@163.com">我<i></i></span> <img src="http://img.dewen.org/upload/avatar/010/128/696/user_10128696_avatar_1384404591_r.png" id="top_avatar" class="icons" title="mdep, mga_dependent@163.com"> <span class="name" title="mdep, mga_dependent@163.com">我<i></i></span> LOL; preg_match_all('|<img.?src=\'"[\'"].?>|i', $content, $images); var_dump($content); var_dump($images);
Output for 4.3.0 - 7.1.0
string(469) " <img src="http://img.dewen.org/upload/avatar/010/128/696/user_10128696_avatar_1384404591_r.png" id="top_avatar"> <span class="name" title="mdep, mga_dependent@163.com">我<i></i></span> <img src="http://img.dewen.org/upload/avatar/010/128/696/user_10128696_avatar_1384404591_r.png" id="top_avatar" class="icons" title="mdep, mga_dependent@163.com"> <span class="name" title="mdep, mga_dependent@163.com">我<i></i></span>" array(1) { [0]=> array(0) { } }