(PHP 8 >= 8.5.0)
Uri\Rfc3986\Uri::getScheme — Récupère le composant schéma normalisé
Récupère le composant schéma normalisé.
Cette fonction ne contient aucun paramètre.
Retourne le composant schéma normalisé sous forme de string si le composant schéma existe, null est retourné sinon.
Exemple #1 Exemple simple avec Uri\Rfc3986\Uri::getScheme()
<?php
$uri = new \Uri\Rfc3986\Uri("https://example.com");
echo $uri->getScheme();
?>L'exemple ci-dessus va afficher :
https