-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathoperators.xml
executable file
·58 lines (56 loc) · 2.33 KB
/
operators.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 52407313885d27a4e891e08dd2e2481bcc39e244 Maintainer: jhdxr Status: ready -->
<!-- CREDITS: mowangjuanzi -->
<chapter xml:id="language.operators" xmlns="http://docbook.org/ns/docbook">
<title>运算符</title>
<simpara>
运算符是可以通过给出的一或多个值(用编程行话来说,表达式)来产生另一个值(因而整个结构成为一个表达式)的东西。
</simpara>
<para>
运算符可按照其能接受几个值来分组。一元运算符只能接受一个值,例如
<literal>!</literal>(<link linkend="language.operators.logical">逻辑取反运算符</link>)或
<literal>++</literal>(<link linkend="language.operators.increment">递增运算符</link>)。
二元运算符可接受两个值,例如熟悉的<link
linkend="language.operators.arithmetic">算术运算符</link>
<literal>+</literal>(加)和 <literal>-</literal>(减),大多数 PHP
运算符都是这种。最后是唯一的<link
linkend="language.operators.comparison.ternary">三元运算符</link> <literal>? :</literal>,可接受三个值;通常就简单称之为“三元运算符”(尽管称之为条件运算符可能更合适)。
</para>
<para>
PHP 的运算符完整列表见下节<link
linkend="language.operators.precedence">运算符优先级</link>。该节也解释了运算符优先级和结合方向,这控制着在表达式包含有若干个不同运算符时究竟怎样对其求值。
</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;
</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:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->