Files
doc-fr/language/types/null.xml
George Peter Banyard d854944559 Update language features
2021-08-19 16:21:29 +02:00

94 lines
2.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: a8796e2f7135ffb53d71dbd4020fcf3ecca19e09 Maintainer: jpauli Status: ready -->
<!-- Reviewed: yes Maintainer: girgias -->
<sect1 xml:id="language.types.null">
<title>NULL</title>
<para>
La valeur spéciale &null; représente une variable sans valeur. &null; est
la seule valeur possible du type <type>null</type>.
</para>
<para>
Une variable est considérée comme <type>null</type> si :
</para>
<itemizedlist>
<listitem>
<para>
elle s'est vue assigner la constante &null;.
</para>
</listitem>
<listitem>
<para>
elle n'a pas encore reçu de valeur.
</para>
</listitem>
<listitem>
<para>
elle a été effacée avec la fonction <function>unset</function>.
</para>
</listitem>
</itemizedlist>
<sect2 xml:id="language.types.null.syntax">
<title>Syntaxe</title>
<para>
Il y a une seule valeur de type <type>null</type>, et c'est la constante
insensible à la casse &null;.
</para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
$var = NULL;
?>
]]>
</programlisting>
</informalexample>
<para>
Voir aussi les fonctions <function>is_null</function> et
<function>unset</function>.
</para>
</sect2>
<sect2 xml:id="language.types.null.casting">
<title>Transtyper vers &null;</title>
<para>
&warn.deprecated.feature-7-2-0.removed-8-0-0;
</para>
<para>
Transtyper une variable vers <type>null</type> en utilisant
la syntaxe <literal>(unset) $var</literal> <emphasis>n'effacera pas</emphasis>
la variable, ni écrasera sa valeur. Ca ne fera que retourner
la valeur &null;.
</para>
</sect2>
</sect1>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->