diff --git a/reference/uri/uri/whatwg/url/getport.xml b/reference/uri/uri/whatwg/url/getport.xml index 10587042db8e..c123438c6158 100644 --- a/reference/uri/uri/whatwg/url/getport.xml +++ b/reference/uri/uri/whatwg/url/getport.xml @@ -35,16 +35,20 @@ getPort()); -echo $url->getPort(); +// 443 is the default port for https, so it is not stored. +$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 560af29fd6e0..a14cb5ebf7a8 100644 --- a/reference/uri/uri/whatwg/url/parse.xml +++ b/reference/uri/uri/whatwg/url/parse.xml @@ -79,7 +79,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 400eabac1e06..ec298021a044 100644 --- a/reference/uri/uri/whatwg/url/withport.xml +++ b/reference/uri/uri/whatwg/url/withport.xml @@ -50,16 +50,21 @@ withPort(443); +var_dump($url->getPort()); -echo $url->getPort(); +$url = $url->withPort(8443); +var_dump($url->getPort()); ?> ]]> &example.outputs;