3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_content = '<p><img src="http://bla.bla/bla.jpg">As big a threat as ISIS is, the competition that truly defines the Middle East is the one between Saudi Arabia and Iran. Where do we fit in?<br clear="all"></p>'; $_content = trim(preg_replace(array('#<p[^>]*>#i', '#</p>#i', '#<br[^>]*>#i','#</br>#i'), '', $_content)); echo $_content; if(stripos($_content, '<img ') === false) { echo "\nNO IMG"; } else { echo "\nIMG"; }

preferences:
35.19 ms | 402 KiB | 5 Q