Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions reference/datetime/datetimezone/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ foreach ($timezones as $tz) {
<screen>
<![CDATA[
Europe/London
DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (Mars/Phobos)
DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone (Jupiter/Europa)
DateTimeZone::__construct(): Unknown or bad timezone (Mars/Phobos)
DateTimeZone::__construct(): Unknown or bad timezone (Jupiter/Europa)
]]>
</screen>
</example>
Expand Down
19 changes: 10 additions & 9 deletions reference/datetime/functions/date-sun-info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@
<programlisting role="php">
<![CDATA[
<?php
date_default_timezone_set('Asia/Jerusalem');
$sun_info = date_sun_info(strtotime("2006-12-12"), 31.7667, 35.2333);
foreach ($sun_info as $key => $val) {
echo "$key: " . date("H:i:s", $val) . "\n";
Expand All @@ -184,15 +185,15 @@ foreach ($sun_info as $key => $val) {
&example.outputs;
<screen>
<![CDATA[
sunrise: 05:52:11
sunset: 15:41:21
transit: 10:46:46
civil_twilight_begin: 05:24:08
civil_twilight_end: 16:09:24
nautical_twilight_begin: 04:52:25
nautical_twilight_end: 16:41:06
astronomical_twilight_begin: 04:21:32
astronomical_twilight_end: 17:12:00
sunrise: 06:29:21
sunset: 16:36:00
transit: 11:32:41
civil_twilight_begin: 06:02:36
civil_twilight_end: 17:02:45
nautical_twilight_begin: 05:32:14
nautical_twilight_end: 17:33:08
astronomical_twilight_begin: 05:02:31
astronomical_twilight_end: 18:02:51
]]>
</screen>
</example>
Expand Down
4 changes: 2 additions & 2 deletions reference/random/random/engine/pcgoneseq128xslrr64/jump.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ echo "B: ", bin2hex($b->engine->generate()), "\n";
&example.outputs;
<screen>
<![CDATA[
A: 1e9f3107d56653d0
B: a156c0086dd79d44
A: f69395f787ce788e
B: 1e9f3107d56653d0
B: f69395f787ce788e
]]>
</screen>
</example>
Expand Down
10 changes: 7 additions & 3 deletions reference/uri/uri/whatwg/url/getport.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,20 @@
<programlisting role="php">
<![CDATA[
<?php
$url = new \Uri\WhatWg\Url("https://example.com:443");
$url = new \Uri\WhatWg\Url("https://example.com:8080");
var_dump($url->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());
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
443
int(8080)
NULL
]]>
</screen>
</example>
Expand Down
2 changes: 1 addition & 1 deletion reference/uri/uri/whatwg/url/parse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ if ($url !== null) {
&example.outputs;
<screen>
<![CDATA[
Valid URL: https://example.com
Valid URL: https://example.com/
]]>
</screen>
</example>
Expand Down
9 changes: 7 additions & 2 deletions reference/uri/uri/whatwg/url/withport.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,21 @@
<![CDATA[
<?php
$url = new \Uri\WhatWg\Url("https://example.com:8080");

// 443 is the default port for https, so it is not stored.
$url = $url->withPort(443);
var_dump($url->getPort());

echo $url->getPort();
$url = $url->withPort(8443);
var_dump($url->getPort());
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
443
NULL
int(8443)
]]>
</screen>
</example>
Expand Down