PHP Get Sous-domaine

$subdomain = explode('.', $_SERVER['HTTP_HOST'])[0];
portapipe