3v4l.org

run code in 300+ PHP versions simultaneously
<?php $owned_urls= array('website1.com', 'website2.com', 'website3.com'); $string = 'my domain name is website3.com'; foreach ($owned_urls as $url) { if (strstr($url, $string)) { echo "Match found"; return true; } } echo "Not found!"; return false;

preferences:
36.18 ms | 402 KiB | 5 Q