update page now

Uri\WhatWg\Url::getPath

(PHP 8 >= 8.5.0)

Uri\WhatWg\Url::getPathRécupère le composant chemin

Description

public Uri\WhatWg\Url::getPath(): string

Récupère le composant chemin.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne le composant chemin sous forme de chaîne de caractères.

Exemples

Exemple #1 Exemple simple avec Uri\WhatWg\Url::getPath()

<?php
$url
= new \Uri\WhatWg\Url("https://example.com/foo/bar");

echo
$url->getPath();
?>

L'exemple ci-dessus va afficher :

/foo/bar

Voir aussi

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top