mirror of
https://github.com/php/doc-fr.git
synced 2026-03-23 22:52:18 +01:00
65 lines
2.4 KiB
XML
65 lines
2.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: 2946c8a267734a9e8696e1764f7436e6caa8909c Maintainer: yannick Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<chapter xml:id="language.operators" xmlns="http://docbook.org/ns/docbook" annotations="interactive">
|
|
<title>Les opérateurs</title>
|
|
<simpara>
|
|
Un opérateur est quelque chose qui prend une ou plusieurs valeurs
|
|
(ou expressions, dans le jargon de la programmation) et qui produit une
|
|
autre valeur (donc la construction elle-même devient une expression).
|
|
</simpara>
|
|
<para>
|
|
Les opérateurs peuvent être regroupés en fonction du nombre de valeurs
|
|
qu'ils acceptent. L'opérateur unaire n'opère que sur une seule valeur,
|
|
par exemple <literal>!</literal>
|
|
(l'<link linkend="language.operators.logical">opérateur de négation</link>)
|
|
ou <literal>++</literal>
|
|
(l'<link linkend="language.operators.increment">opérateur d'incrémentation</link>).
|
|
Le second type, les opérateurs binaires (comme le très célèbre
|
|
<link linkend="language.operators.arithmetic">opérateur mathématique</link>
|
|
<literal>+</literal> ou <literal>-</literal>) contient la plupart des opérateurs
|
|
supportés par PHP. Enfin,
|
|
l'<link linkend="language.operators.comparison.ternary">opérateur ternaire</link>,
|
|
<literal>? :</literal>, qui accepte trois valeurs (on peut aussi l'appeler l'opérateur
|
|
conditionnel).
|
|
</para>
|
|
<para>
|
|
Une liste complète des opérateurs se trouve dans la section
|
|
<link linkend="language.operators.precedence">précédence des opérateurs</link>.
|
|
Cette section explique aussi la précédence des opérateurs et l'associativité, c'est-à-dire
|
|
les priorités d'exécution des opérateurs.
|
|
</para>
|
|
|
|
&language.operators.precedence;
|
|
&language.operators.arithmetic;
|
|
&language.operators.increment;
|
|
&language.operators.assignment;
|
|
&language.operators.bitwise;
|
|
&language.operators.comparison;
|
|
&language.operators.errorcontrol;
|
|
&language.operators.execution;
|
|
&language.operators.logical;
|
|
&language.operators.string;
|
|
&language.operators.array;
|
|
&language.operators.type;
|
|
&language.operators.functional;
|
|
|
|
</chapter>
|
|
<!-- 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:
|
|
-->
|