(PHP 8 >= 8.5.0)
Uri\WhatWg\Url::getPath — Obtém o componente path
Esta função não possui parâmetros.
Retorna o componente path como uma string.
Exemplo #1 Exemplo básico de Uri\WhatWg\Url::getPath()
<?php
$url = new \Uri\WhatWg\Url("https://example.com/foo/bar");
echo $url->getPath();
?>O exemplo acima produzirá:
/foo/bar