(PHP 8 >= 8.5.0)
Uri\WhatWg\Url::getPath — Recupera el componente de ruta
Esta función no contiene ningún parámetro.
Devuelve el componente de ruta como un string.
Ejemplo #1 Ejemplo básico de Uri\WhatWg\Url::getPath()
<?php
$url = new \Uri\WhatWg\Url("https://example.com/foo/bar");
echo $url->getPath();
?>El ejemplo anterior mostrará:
/foo/bar