language/types/null.xml
161dde4fe721309398dd324edbf02aec409f127b
...
...
@@ -4,32 +4,15 @@
4
4
<title>NULL</title>
5
5
6
6
<para>
7
-
The special &null; value represents a variable with no value. &null; is the
8
-
only possible value of type <type>null</type>.
7
+
The <type>null</type> type is PHP's unit type, i.e. it has only one value:
8
+
&null;.
9
9
</para>
10
10

11
11
<para>
12
-
A variable is considered to be <type>null</type> if:
12
+
Undefined, and <function>unset</function> variables will resolve to the
13
+
value &null;.
13
14
</para>
14
15
15
-
<itemizedlist>
16
-
<listitem>
17
-
<para>
18
-
it has been assigned the constant &null;.
19
-
</para>
20
-
</listitem>
21
-
<listitem>
22
-
<para>
23
-
it has not been set to any value yet.
24
-
</para>
25
-
</listitem>
26
-
<listitem>
27
-
<para>
28
-
it has been <function>unset</function>.
29
-
</para>
30
-
</listitem>
31
-
</itemizedlist>
32
-
33
16
<sect2 xml:id="language.types.null.syntax">
34
17
<title>Syntax</title>
35
18

...
...
@@ -47,18 +30,16 @@ $var = NULL;
47
30
]]>
48
31
</programlisting>
49
32
</informalexample>
50
-

51
-
<para>
52
-
See also the functions <function>is_null</function> and
53
-
<function>unset</function>.
54
-
</para>
55
-

56
33
</sect2>
57
34
58
35
<sect2 xml:id="language.types.null.casting">
59
36
<title>Casting to &null;</title>
60
37

61
38
<para>
39
+
&warn.deprecated.feature-7-2-0.removed-8-0-0;
40
+
</para>
41
+

42
+
<para>
62
43
Casting a variable to <type>null</type> using <literal>(unset) $var</literal>
63
44
will <emphasis>not</emphasis> remove the variable or unset its value.
64
45
It will only return a &null; value.
...
...
@@ -66,8 +47,17 @@ $var = NULL;
66
47

67
48
</sect2>
68
49

69
-
</sect1>
50
+
<sect2 role="seealso">
51
+
&reftitle.seealso;
52
+
<para>
53
+
<simplelist>
54
+
<member><function>is_null</function></member>
55
+
<member><function>unset</function></member>
56
+
</simplelist>
57
+
</para>
58
+
</sect2>
70
59

60
+
</sect1>
71
61
<!-- Keep this comment at the end of the file
72
62
Local variables:
73
63
mode: sgml
74
64