(PHP 8 >= 8.5.0)
Uri\WhatWg\Url::withPassword — Modify the password component
Creates a new URL and modifies its password component.
passwordThe modified Uri\WhatWg\Url instance.
If the resulting URL is invalid, a Uri\WhatWg\InvalidUrlException is thrown.
Örnek 1 Uri\WhatWg\Url::withPassword() basic example
<?php
$url = new \Uri\WhatWg\Url("https://user:password@example.com");
$url = $url->withPassword("pass");
echo $url->getPassword();
?>Yukarıdaki örneğin çıktısı:
pass