File tree Expand file tree Collapse file tree 4 files changed +18
-11
lines changed Expand file tree Collapse file tree 4 files changed +18
-11
lines changed Original file line number Diff line number Diff 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.unit ;
134+ &language.types.singleton ;
135135 &language.types.iterable;
136136 &language.types.declarations;
137137 &language.types.type-juggling;
Original file line number Diff line number Diff 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 unit types <type >false</type >
274+ It is not possible to combine the two singleton types <type >false</type >
275275 and <type >true</type > together in a union type.
276276 Use <type >bool</type > instead.
277277 </simpara >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
2- <sect1 xml : id =" language.types.unit " >
3- <title >Unit types</title >
2+ <sect1 xml : id =" language.types.singleton " >
3+ <title >Singleton types</title >
44
55 <para >
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 > .
6+ Singleton types are those which allow only one value.
7+ PHP has support for two singleton types:
8+ <type >false</type > as of PHP 8.0.0 and <type >true</type >
9+ as of PHP 8.2.0.
1010 </para >
1111
1212 <warning >
1313 <simpara >
14- Prior to PHP 8.2.0 the <type >false</type > and < type >null</ type > type
14+ Prior to PHP 8.2.0 the <type >false</type > type
1515 could only be used as part of a
1616 <link linkend =" language.types.type-system.composite.union" >union type</link >.
1717 </simpara >
1818 </warning >
1919
2020 <note >
2121 <simpara >
22- It is not possible to define custom unit types. Consider using an
22+ It is not possible to define custom singleton types. Consider using an
2323 <link linkend =" language.types.enumerations" >enumerations</link > instead.
2424 </simpara >
2525 </note >
Original file line number Diff line number Diff line change 6969 </listitem >
7070 <listitem >
7171 <simpara >
72- <link linkend =" language.types.unit " >Unit types</link >
72+ <link linkend =" language.types.singleton " >Singleton types</link >
7373 </simpara >
7474 <itemizedlist >
7575 <listitem >
7878 <listitem >
7979 <simpara ><type >true</type ></simpara >
8080 </listitem >
81+ </itemizedlist >
82+ </listitem >
83+ <listitem >
84+ <simpara >
85+ Unit types
86+ </simpara >
87+ <itemizedlist >
8188 <listitem >
8289 <simpara ><type >null</type ></simpara >
8390 </listitem >
You can’t perform that action at this time.
0 commit comments