3v4l.org

run code in 300+ PHP versions simultaneously
<?php $body = "<img alt='' src='http://img.dev.teeeest/images/UID' /> <img alt='' src='https://img.deaaav.test.com/images/UID.ux/' /> <img alt='' src='http://api.com/images/UID' /> <img alt='' src='http://img.deaSassav.test/images/UID' /> <img alt='' src='https://img.dev.test/images/UID' />"; $body = stripslashes($body); $img_array = array(); preg_match_all("/<img.*?src='(?!http[s]*:\/\/img.[a-zA-Z0-9]*.test\/)(.*?)/imU", $body, $img_array); echo "<pre>"; print_r($img_array[0]); echo "</pre>";
Output for 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.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.27, 8.4.1 - 8.4.14
<pre>Array ( [0] => <img alt='' src='http://img.dev.teeeest/images/UID' /> [1] => <img alt='' src='https://img.deaaav.test.com/images/UID.ux/' /> [2] => <img alt='' src='http://api.com/images/UID' /> ) </pre>

preferences:
156.09 ms | 408 KiB | 5 Q