diff --git a/reference/uri/uri/whatwg/url/getport.xml b/reference/uri/uri/whatwg/url/getport.xml index af2d04f190..767632a711 100644 --- a/reference/uri/uri/whatwg/url/getport.xml +++ b/reference/uri/uri/whatwg/url/getport.xml @@ -1,5 +1,5 @@ - + Uri\WhatWg\Url::getPort @@ -37,15 +37,19 @@ getPort()); -echo $url->getPort(); +// 443 — стандартный порт для схемы https, поэтому он не сохраняется. +$url = new \Uri\WhatWg\Url("https://example.com:443"); +var_dump($url->getPort()); ]]> &example.outputs; diff --git a/reference/uri/uri/whatwg/url/parse.xml b/reference/uri/uri/whatwg/url/parse.xml index ed8314319d..063421226b 100644 --- a/reference/uri/uri/whatwg/url/parse.xml +++ b/reference/uri/uri/whatwg/url/parse.xml @@ -1,5 +1,5 @@ - + @@ -82,7 +82,7 @@ if ($url !== null) { &example.outputs; diff --git a/reference/uri/uri/whatwg/url/withport.xml b/reference/uri/uri/whatwg/url/withport.xml index ef8fc40ccb..7e776ba8da 100644 --- a/reference/uri/uri/whatwg/url/withport.xml +++ b/reference/uri/uri/whatwg/url/withport.xml @@ -1,5 +1,5 @@ - + Uri\WhatWg\Url::withPort @@ -52,15 +52,20 @@ withPort(443); +var_dump($url->getPort()); -echo $url->getPort(); +$url = $url->withPort(8443); +var_dump($url->getPort()); ]]> &example.outputs;