update page now

Uri\WhatWg\Url::getPath

(PHP 8 >= 8.5.0)

Uri\WhatWg\Url::getPathObtém o componente path

Descrição

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

Obtém o componente path.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

Retorna o componente path como uma string.

Exemplos

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

Veja Também

adicionar nota

Notas de Usuários

Não há notas de usuários para esta página.
To Top