Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PHP 8.4] Function return type changes #4083

Merged
merged 3 commits into from
Nov 17, 2024
Merged
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: 9 additions & 3 deletions reference/misc/functions/highlight-string.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>bool</type></type><methodname>highlight_string</methodname>
<type class="union"><type>string</type><type>true</type></type><methodname>highlight_string</methodname>
<methodparam><type>string</type><parameter>string</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>return</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -48,8 +48,8 @@
&reftitle.returnvalues;
<para>
If <parameter>return</parameter> is set to &true;, returns the highlighted
code as a string instead of printing it out. Otherwise, it will return
&true; on success, &false; on failure.
code as a string instead of printing it out.
Otherwise, it will return &true;.
</para>
</refsect1>

Expand All @@ -65,6 +65,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Return type changed from <type class="union"><type>string</type><type>bool</type></type> to <type class="union"><type>string</type><type>true</type></type>.
</entry>
</row>
<row>
<entry>8.3.0</entry>
<entry>
Expand Down
8 changes: 7 additions & 1 deletion reference/network/functions/long2ip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns the Internet IP address as a string, &return.falseforfailure;.
Returns the Internet IP address as a <type>string</type>.
</para>
</refsect1>

Expand All @@ -53,6 +53,12 @@
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Return type changed from <type class="union"><type>string</type><type>false</type></type> to <type>string</type>.
</entry>
</row>
<row>
<entry>7.1.0</entry>
<entry>
Expand Down
26 changes: 25 additions & 1 deletion reference/var/functions/print-r.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type class="union"><type>string</type><type>bool</type></type><methodname>print_r</methodname>
<type class="union"><type>string</type><type>true</type></type><methodname>print_r</methodname>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>return</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
Expand Down Expand Up @@ -67,6 +67,30 @@
</para>
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.4.0</entry>
<entry>
Return type changed from <type class="union"><type>string</type><type>bool</type></type> to <type class="union"><type>string</type><type>true</type></type>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<para>
Expand Down