[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] [doc-en] master: Replace <literal>true/false</literal> by their respective entities (#2399
From: Pierrick Charron via GitHub <noreply () php ! net>
Date: 2023-04-03 21:43:08
Message-ID: 86mRKhBiSez7PrRsXXLlH3qV3TSTlN1iUsbRjtgkTM () main ! php ! net
[Download RAW message or body]
Author: Pierrick Charron (adoy)
Committer: GitHub (web-flow)
Pusher: adoy
Date: 2023-04-03T17:29:55-04:00
Commit: https://github.com/php/doc-en/commit/cdc9d28d334bbc08386fecf8aade66080004a9dd
Raw diff: https://github.com/php/doc-en/commit/cdc9d28d334bbc08386fecf8aade66080004a9dd.diff
Replace <literal>true/false</literal> by their respective entities (#2399)
* Replace <literal>true/false</literal> by their respective entities
* Fixes
Changed paths:
M language/control-structures/switch.xml
M language/enumerations.xml
M language/types/array.xml
M language/types/declarations.xml
M language/types/literal.xml
M reference/luasandbox/luasandbox/callfunction.xml
M reference/luasandbox/luasandbox/setcpulimit.xml
M reference/luasandbox/luasandboxfunction/call.xml
M reference/misc/functions/define.xml
M reference/mongodb/architecture.xml
M reference/outcontrol/functions/ob-implicit-flush.xml
M reference/ps/functions/ps-show-boxed.xml
M reference/sem/functions/sem-acquire.xml
Diff:
diff --git a/language/control-structures/switch.xml \
b/language/control-structures/switch.xml index a3c8ff44c19..3ffa3a6098c 100644
--- a/language/control-structures/switch.xml
+++ b/language/control-structures/switch.xml
@@ -211,7 +211,7 @@ switch ($target) {
</informalexample>
</para>
<para>
- For more complex comparisons, the value <literal>true</literal> may be used as the \
switch value. + For more complex comparisons, the value &true; may be used as the \
switch value. Or, alternatively, <literal>if</literal>-<literal>else</literal> \
blocks instead of <literal>switch</literal>. <informalexample>
<programlisting role="php">
diff --git a/language/enumerations.xml b/language/enumerations.xml
index 557e45f0784..d96bab567ea 100644
--- a/language/enumerations.xml
+++ b/language/enumerations.xml
@@ -678,7 +678,7 @@ print serialize(Suit::Hearts);
<para>
On deserialization, if an enum and case cannot be found to match a serialized
- value a warning will be issued and <literal>false</literal> returned.</para>
+ value a warning will be issued and &false; returned.</para>
<para>
If a Pure Enum is serialized to JSON, an error will be thrown. If a Backed Enum
diff --git a/language/types/array.xml b/language/types/array.xml
index d8f93d10a2b..8a6d96aaafe 100644
--- a/language/types/array.xml
+++ b/language/types/array.xml
@@ -102,8 +102,8 @@ $array = [
<listitem>
<simpara>
<type>Bool</type>s are cast to <type>int</type>s, too, i.e. the key
- <literal>true</literal> will actually be stored under <literal>1</literal>
- and the key <literal>false</literal> under <literal>0</literal>.
+ &true; will actually be stored under <literal>1</literal>
+ and the key &false; under <literal>0</literal>.
</simpara>
</listitem>
<listitem>
diff --git a/language/types/declarations.xml b/language/types/declarations.xml
index beac582d229..1624e4c90e5 100644
--- a/language/types/declarations.xml
+++ b/language/types/declarations.xml
@@ -260,18 +260,18 @@ Stack trace:
<title>Union types</title>
<warning>
<simpara>
- It is not possible to combine the two literal types <literal>false</literal>
- and <literal>true</literal> together in a union type.
+ It is not possible to combine the two literal types <type>false</type>
+ and <type>true</type> together in a union type.
Use <type>bool</type> instead.
</simpara>
</warning>
<caution>
<simpara>
- Prior to PHP 8.2.0, as <literal>false</literal> and <type>null</type>
+ Prior to PHP 8.2.0, as <type>false</type> and <type>null</type>
could not be used as standalone types, a union type comprised of only
these types was not permitted. This comprises the following types:
- <literal>false</literal>, <literal>false|null</literal>,
+ <type>false</type>, <literal>false|null</literal>,
and <literal>?false</literal>.
</simpara>
</caution>
diff --git a/language/types/literal.xml b/language/types/literal.xml
index 608d4462bb6..830017293fc 100644
--- a/language/types/literal.xml
+++ b/language/types/literal.xml
@@ -5,13 +5,13 @@
<para>
Literal types are type which not only check the type of a value but also
the value itself. PHP has support for two literal types:
- <literal>false</literal> as of PHP 8.0.0, and <literal>true</literal>
+ <type>false</type> as of PHP 8.0.0, and <type>true</type>
as of PHP 8.2.0.
</para>
<warning>
<simpara>
- Prior to PHP 8.2.0 the <literal>false</literal> type could only be used as part \
of a + Prior to PHP 8.2.0 the <type>false</type> type could only be used as part of \
a <link linkend="language.types.type-system.composite.union">union type</link>.
</simpara>
</warning>
diff --git a/reference/luasandbox/luasandbox/callfunction.xml \
b/reference/luasandbox/luasandbox/callfunction.xml index 7f29f0c22b8..58f15ecf8fa \
100644
--- a/reference/luasandbox/luasandbox/callfunction.xml
+++ b/reference/luasandbox/luasandbox/callfunction.xml
@@ -56,7 +56,7 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
- Returns an <type>array</type> of values returned by the Lua function, which may \
be empty, or <literal>false</literal> in case of failure. + Returns an \
<type>array</type> of values returned by the Lua function, which may be empty, \
&return.falseforfailure;. </para>
</refsect1>
diff --git a/reference/luasandbox/luasandbox/setcpulimit.xml \
b/reference/luasandbox/luasandbox/setcpulimit.xml index a7b03559850..1352e08dd90 \
100644
--- a/reference/luasandbox/luasandbox/setcpulimit.xml
+++ b/reference/luasandbox/luasandbox/setcpulimit.xml
@@ -44,7 +44,7 @@
<term><parameter>limit</parameter></term>
<listitem>
<para>
- Limit as a <type>float</type> in seconds, or <literal>false</literal> for no \
limit. + Limit as a <type>float</type> in seconds, or &false; for no limit.
</para>
</listitem>
</varlistentry>
diff --git a/reference/luasandbox/luasandboxfunction/call.xml \
b/reference/luasandbox/luasandboxfunction/call.xml index 6e52a20779e..01729f6cf30 \
100644
--- a/reference/luasandbox/luasandboxfunction/call.xml
+++ b/reference/luasandbox/luasandboxfunction/call.xml
@@ -18,7 +18,7 @@
</para>
<para>
Errors considered to be the fault of the PHP code will result in the
- function returning <literal>false</literal> and <constant>E_WARNING</constant>
+ function returning &false; and <constant>E_WARNING</constant>
being raised, for example, a <type>resource</type> type being used as an
argument. Lua errors will result in a \
<classname>LuaSandboxRuntimeError</classname> exception being thrown.
@@ -133,7 +133,7 @@
&reftitle.returnvalues;
<para>
Returns an <type>array</type> of values returned by the function, which may be \
empty,
- or <literal>false</literal> on error.
+ &return.falseforfailure;.
</para>
</refsect1>
diff --git a/reference/misc/functions/define.xml \
b/reference/misc/functions/define.xml index 3b6e35ec36e..b010792e865 100644
--- a/reference/misc/functions/define.xml
+++ b/reference/misc/functions/define.xml
@@ -67,8 +67,8 @@
<warning>
<simpara>
Defining case-insensitive constants is deprecated as of PHP 7.3.0.
- As of PHP 8.0.0, only <literal>false</literal> is an acceptable value, \
passing
- <literal>true</literal> will produce a warning.
+ As of PHP 8.0.0, only &false; is an acceptable value, passing
+ &true; will produce a warning.
</simpara>
</warning>
<note>
diff --git a/reference/mongodb/architecture.xml b/reference/mongodb/architecture.xml
index 1ad22493383..adf62a2733d 100644
--- a/reference/mongodb/architecture.xml
+++ b/reference/mongodb/architecture.xml
@@ -784,7 +784,7 @@ class UpperClass implements MongoDB\BSON\Persistable {
The <methodname>MongoDB\BSON\Unserializable::bsonUnserialize</methodname>
method of YourClass, OurClass, TheirClass iterate over the array and set
the properties without modifications. It <emphasis>also</emphasis> sets
- the <literal>$unserialized</literal> property to <literal>true</literal>:
+ the <literal>$unserialized</literal> property to &true;:
<programlisting role="php">
<![CDATA[
diff --git a/reference/outcontrol/functions/ob-implicit-flush.xml \
b/reference/outcontrol/functions/ob-implicit-flush.xml index e70f6869f4f..1dcbf8c0292 \
100644
--- a/reference/outcontrol/functions/ob-implicit-flush.xml
+++ b/reference/outcontrol/functions/ob-implicit-flush.xml
@@ -28,7 +28,7 @@
<term><parameter>enable</parameter></term>
<listitem>
<para>
- <literal>true</literal> to turn implicit flushing on, \
<literal>false</literal> otherwise. + &true; to turn implicit flushing on, \
&false; otherwise. </para>
</listitem>
</varlistentry>
diff --git a/reference/ps/functions/ps-show-boxed.xml \
b/reference/ps/functions/ps-show-boxed.xml index 0b0b91d2028..ed7887b6969 100644
--- a/reference/ps/functions/ps-show-boxed.xml
+++ b/reference/ps/functions/ps-show-boxed.xml
@@ -140,8 +140,8 @@
<term>linebreak (parameter)</term>
<listitem>
<para>
- Set to <literal>true</literal> if you want a carriage return to start a new \
line instead
- of treating it as a space. Defaults to <literal>false</literal>.
+ Set to &true; if you want a carriage return to start a new line instead
+ of treating it as a space. Defaults to &false;.
</para>
</listitem>
</varlistentry>
@@ -149,8 +149,8 @@
<term>parbreak (parameter)</term>
<listitem>
<para>
- Set to <literal>true</literal> if you want a carriage return on a single \
line to start a
- new paragraph instead of treating it as a space. Defaults to \
<literal>true</literal>. + Set to &true; if you want a carriage return on a \
single line to start a + new paragraph instead of treating it as a space. \
Defaults to &true;. </para>
</listitem>
</varlistentry>
@@ -158,9 +158,9 @@
<term>hyphenation (parameter)</term>
<listitem>
<para>
- Set to <literal>true</literal> in order to turn hyphenation on. This \
requires a + Set to &true; in order to turn hyphenation on. This requires a
dictionary to be set with the parameter <parameter>hyphendict</parameter>. \
Defaults to
- <literal>false</literal>.
+ &false;.
</para>
</listitem>
</varlistentry>
diff --git a/reference/sem/functions/sem-acquire.xml \
b/reference/sem/functions/sem-acquire.xml index ed6c2b62ca7..d776a11b396 100644
--- a/reference/sem/functions/sem-acquire.xml
+++ b/reference/sem/functions/sem-acquire.xml
@@ -44,8 +44,8 @@
<listitem>
<para>
Specifies if the process shouldn't wait for the semaphore to be acquired.
- If set to <literal>true</literal>, the call will return
- <literal>false</literal> immediately if a semaphore cannot be immediately
+ If set to &true;, the call will return
+ &false; immediately if a semaphore cannot be immediately
acquired.
</para>
</listitem>
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic