Skip to content

Commit 713e49c

Browse files
committed
Use "unit type" instead of "value type"
1 parent 969db61 commit 713e49c

File tree

4 files changed

+24
-23
lines changed

4 files changed

+24
-23
lines changed

language/types.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ int(16)
131131
&language.types.void;
132132
&language.types.never;
133133
&language.types.relative-class-types;
134-
&language.types.value;
134+
&language.types.unit;
135135
&language.types.iterable;
136136
&language.types.declarations;
137137
&language.types.type-juggling;

language/types/declarations.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Stack trace:
271271
<title>Union types</title>
272272
<warning>
273273
<simpara>
274-
It is not possible to combine the two value types <type>false</type>
274+
It is not possible to combine the two unit types <type>false</type>
275275
and <type>true</type> together in a union type.
276276
Use <type>bool</type> instead.
277277
</simpara>

language/types/type-system.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
<listitem>
2828
<simpara>Built-in types</simpara>
2929
<itemizedlist>
30-
<listitem>
31-
<simpara><type>null</type> type</simpara>
32-
</listitem>
3330
<listitem>
3431
<simpara>
3532
Scalar types:
@@ -70,18 +67,21 @@
7067
<type>self</type>, <type>parent</type>, and <type>static</type>
7168
</simpara>
7269
</listitem>
73-
</itemizedlist>
74-
</listitem>
75-
<listitem>
76-
<simpara>
77-
<link linkend="language.types.value">Value types</link>
78-
</simpara>
79-
<itemizedlist>
80-
<listitem>
81-
<simpara><type>false</type></simpara>
82-
</listitem>
8370
<listitem>
84-
<simpara><type>true</type></simpara>
71+
<simpara>
72+
<link linkend="language.types.unit">Unit types</link>
73+
</simpara>
74+
<itemizedlist>
75+
<listitem>
76+
<simpara><type>false</type></simpara>
77+
</listitem>
78+
<listitem>
79+
<simpara><type>true</type></simpara>
80+
</listitem>
81+
<listitem>
82+
<simpara><type>null</type></simpara>
83+
</listitem>
84+
</itemizedlist>
8585
</listitem>
8686
</itemizedlist>
8787
</listitem>

language/types/value.xml renamed to language/types/unit.xml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<sect1 xml:id="language.types.value">
3-
<title>Value types</title>
3+
<title>Unit types</title>
44

55
<para>
6-
Value types are those which not only check the type of a value but also
7-
the value itself. PHP has support for two value types:
8-
<type>false</type> as of PHP 8.0.0, and <type>true</type>
9-
as of PHP 8.2.0.
6+
Unit types are those which allow only one value.
7+
PHP has support for three unit types:
8+
<type>false</type> as of PHP 8.0.0, <type>true</type>
9+
as of PHP 8.2.0, and <type>null</type>.
1010
</para>
1111

1212
<warning>
1313
<simpara>
14-
Prior to PHP 8.2.0 the <type>false</type> type could only be used as part of a
14+
Prior to PHP 8.2.0 the <type>false</type> and <type>null</type> type
15+
could only be used as part of a
1516
<link linkend="language.types.type-system.composite.union">union type</link>.
1617
</simpara>
1718
</warning>
1819

1920
<note>
2021
<simpara>
21-
It is not possible to define custom value types. Consider using an
22+
It is not possible to define custom unit types. Consider using an
2223
<link linkend="language.types.enumerations">enumerations</link> instead.
2324
</simpara>
2425
</note>

0 commit comments

Comments
 (0)