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
12 changes: 8 additions & 4 deletions reference/uri/uri/whatwg/url/getport.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a00f03a6131b0b74c851b06879c528fc9537da8c Maintainer: malferov Status: ready -->
<!-- EN-Revision: 0e06411471a898974e114bd57f624781fe3a0b89 Maintainer: malferov Status: ready -->
<refentry xml:id="uri-whatwg-url.getport" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Uri\WhatWg\Url::getPort</refname>
Expand Down Expand Up @@ -37,15 +37,19 @@
<![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 — стандартный порт для схемы https, поэтому он не сохраняется.
$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
4 changes: 2 additions & 2 deletions reference/uri/uri/whatwg/url/parse.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 8e2cfbdce0cd028a6521c6e073f148e0f7efac7c Maintainer: malferov Status: ready -->
<!-- EN-Revision: 0e06411471a898974e114bd57f624781fe3a0b89 Maintainer: malferov Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="uri-whatwg-url.parse" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -82,7 +82,7 @@ if ($url !== null) {
&example.outputs;
<screen>
<![CDATA[
Допустимый URL-адрес: https://example.com
Допустимый URL-адрес: https://example.com/
]]>
</screen>
</example>
Expand Down
11 changes: 8 additions & 3 deletions reference/uri/uri/whatwg/url/withport.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 39596f1226fd3b502bfbba09068ad6701235426f Maintainer: malferov Status: ready -->
<!-- EN-Revision: 0e06411471a898974e114bd57f624781fe3a0b89 Maintainer: malferov Status: ready -->
<refentry xml:id="uri-whatwg-url.withport" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>Uri\WhatWg\Url::withPort</refname>
Expand Down Expand Up @@ -52,15 +52,20 @@
<?php

$url = new \Uri\WhatWg\Url("https://example.com:8080");

// 443 — стандартный порт для схемы https, поэтому он не сохраняется.
$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
Loading