3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $sites = array('naughtyappetite.com',); $url = "https://m.naughtyappetite.com/oth.php?dynamicpage=all_1cm_universal_light_n&ver=1"; $url = parse_url($url, PHP_URL_HOST); if (!empty($url)) { $url = preg_replace('/^(www\.|m\.)/i', '', $url); } if (!empty($url) && in_array($url, $sites)) { die(var_dump($url, true)); } else { die(var_dump($url, false)); }
Output for 5.6.30
string(19) "naughtyappetite.com" bool(true)