diff --git a/reference/datetime/functions/date-sun-info.xml b/reference/datetime/functions/date-sun-info.xml index 7a78297eeb..9c7436e76e 100644 --- a/reference/datetime/functions/date-sun-info.xml +++ b/reference/datetime/functions/date-sun-info.xml @@ -1,6 +1,6 @@ - + @@ -178,6 +178,7 @@ $val) { echo "$key: " . date("H:i:s", $val) . "\n"; @@ -187,15 +188,15 @@ foreach ($sun_info as $key => $val) { &example.outputs; @@ -279,13 +280,13 @@ $si = date_sun_info(strtotime('2022-08-26'), 50.45, 30.52); $diff = $si['sunset'] - $si['sunrise']; echo "Length of day: ", floor($diff / 3600), "h ", - floor(($diff % 3600) / 60), "s\n"; + floor(($diff % 3600) / 60), "m\n"; ]]> &example.outputs; diff --git a/reference/uri/uri/whatwg/url/getport.xml b/reference/uri/uri/whatwg/url/getport.xml index 43046adfa0..8d3018eba8 100644 --- a/reference/uri/uri/whatwg/url/getport.xml +++ b/reference/uri/uri/whatwg/url/getport.xml @@ -1,6 +1,6 @@ - + Uri\WhatWg\Url::getPort @@ -37,16 +37,20 @@ 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 39a3272732..187bf24ddf 100644 --- a/reference/uri/uri/whatwg/url/parse.xml +++ b/reference/uri/uri/whatwg/url/parse.xml @@ -1,6 +1,6 @@ - + Uri\WhatWg\Url::parse @@ -81,7 +81,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 f5034486e9..ffc9ad5b2a 100644 --- a/reference/uri/uri/whatwg/url/withport.xml +++ b/reference/uri/uri/whatwg/url/withport.xml @@ -1,6 +1,6 @@ - + @@ -53,16 +53,21 @@ withPort(443); +var_dump($url->getPort()); -echo $url->getPort(); +$url = $url->withPort(8443); +var_dump($url->getPort()); ?> ]]> &example.outputs;