cvs: phpdoc /en/language/types null.xml type-juggling.xml /en/reference/var/functions unset.xml

From: Date: Tue, 12 Aug 2008 22:06:41 +0000
Subject: cvs: phpdoc /en/language/types null.xml type-juggling.xml /en/reference/var/functions unset.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-2024@lists.php.net to get a copy of this message
kalle Tue Aug 12 22:06:41 2008 UTC Modified files: /phpdoc/en/language/types null.xml type-juggling.xml /phpdoc/en/reference/var/functions unset.xml Log: Document (unset) cast http://cvs.php.net/viewvc.cgi/phpdoc/en/language/types/null.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/language/types/null.xml diff -u phpdoc/en/language/types/null.xml:1.4 phpdoc/en/language/types/null.xml:1.5 --- phpdoc/en/language/types/null.xml:1.4 Thu Feb 21 18:43:17 2008 +++ phpdoc/en/language/types/null.xml Tue Aug 12 22:06:40 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <sect1 xml:id="language.types.null"> <title>NULL</title> @@ -60,6 +60,17 @@ </para> </sect2> + + <sect2 xml:id="language.types.null.casting"> + <title>Casting to <literal>NULL</literal></title> + + <para> + Casting a variable to <type>null</type> will remove the variable + and unset its value. + </para> + + </sect2> + </sect1> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/language/types/type-juggling.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/language/types/type-juggling.xml diff -u phpdoc/en/language/types/type-juggling.xml:1.4 phpdoc/en/language/types/type-juggling.xml:1.5 --- phpdoc/en/language/types/type-juggling.xml:1.4 Thu Feb 21 18:43:17 2008 +++ phpdoc/en/language/types/type-juggling.xml Tue Aug 12 22:06:40 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <sect1 xml:id="language.types.type-juggling"> <title>Type Juggling</title> @@ -147,6 +147,9 @@ <listitem> <simpara>(object) - cast to <type>object</type></simpara> </listitem> + <listitem> + <simpara>(unset) - cast to <type>NULL</type> (PHP 5)</simpara> + </listitem> </itemizedlist> <para> @@ -251,6 +254,11 @@ </listitem> <listitem> <simpara> + <link linkend="language.types.null.casting">Converting to NULL</link> + </simpara> + </listitem> + <listitem> + <simpara> <link linkend="types.comparisons">The type comparison tables</link> </simpara> </listitem> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/var/functions/unset.xml?r1=1.18&r2=1.19&diff_format=u Index: phpdoc/en/reference/var/functions/unset.xml diff -u phpdoc/en/reference/var/functions/unset.xml:1.18 phpdoc/en/reference/var/functions/unset.xml:1.19 --- phpdoc/en/reference/var/functions/unset.xml:1.18 Mon Aug 20 12:12:10 2007 +++ phpdoc/en/reference/var/functions/unset.xml Tue Aug 12 22:06:41 2008 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.18 $ --> +<!-- $Revision: 1.19 $ --> <refentry xml:id="function.unset" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>unset</refname> @@ -236,6 +236,20 @@ ]]> </programlisting> </example> + <example> + <title>Using (unset) casting</title> + <programlisting role="php"> +<![CDATA[ +<?php +$words = Array('foo', 'bar', 'baz', 'void'); + +(unset) $words[3]; + +var_dump($words); +?> +]]> + </programlisting> + </example> </para> </refsect1>

« previous php.doc.cvs (#2024) next »