cvs: phpdoc-zh /language operators.xml
| From: | Gregory Song | Date: | Wed, 26 Mar 2003 05:26:01 +0000 |
| Subject: | cvs: phpdoc-zh /language operators.xml | ||
| Groups: | php.doc.zh | ||
| Request: | Send a blank email to doc-zh+get-1252@lists.php.net to get a copy of this message | ||
gregory Wed Mar 26 00:26:01 2003 EDT
Modified files:
/phpdoc-zh/language operators.xml
Log:
Co-revision with the En Version
Index: phpdoc-zh/language/operators.xml
diff -u phpdoc-zh/language/operators.xml:1.6 phpdoc-zh/language/operators.xml:1.7
--- phpdoc-zh/language/operators.xml:1.6 Sun Feb 23 21:17:33 2003
+++ phpdoc-zh/language/operators.xml Wed Mar 26 00:26:01 2003
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="gb2312"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- $Author: gregory $ -->
-<!-- EN-Revision: 1.44 Maintainer: dallas Status: ready -->
+<!-- EN-Revision: 1.46 Maintainer: dallas Status: ready -->
<chapter id="language.operators">
<title>ÔËËã·û</title>
<simpara>
@@ -167,6 +167,9 @@
<simpara>
³ýºÅ£¨¡°/¡±£©×ÜÊÇ·µ»Ø¸¡µãÊý£¬¼´Ê¹Á½¸öÔËËãÊýÊÇÕûÊý£¨»òÓÉ×Ö·û´®×ª»»³ÉµÄÕûÊý£©Ò²ÊÇÕâÑù¡£
</simpara>
+ <simpara>
+ Çë²éÔÄÊֲᡰ<link
linkend="ref.math">Êýѧº¯Êý</link>¡±ÓйØÕ½ڡ£
+ </simpara>
<!--
<simpara>
@@ -353,12 +356,25 @@
<informalexample>
<programlisting role="php">
<![CDATA[
-(expr1) ? (expr2) : (expr3);
+<?php
+// Example usage for: Ternary Operator
+$action = (empty($_POST['action'])) ? 'default' : $_POST['action'];
+
+// The above is identical to this if/else statement
+if (empty($_POST['action'])) {
+ $action = 'default';
+} else {
+ $action = $_POST['action'];
+}
+?>
]]>
</programlisting>
</informalexample>
- Èç¹û <replaceable>expr1</replaceable> µÄֵΪ
&true;£¬Ôò´Ë±í´ïʽµÄֵΪ
<replaceable>expr2</replaceable>£¬Èç¹û
<replaceable>expr1</replaceable> µÄֵΪ
&false;£¬Ôò´Ë±í´ïʽµÄֵΪ <replaceable>expr3</replaceable>¡£
+ ¶ÔÓÚ±í´ïʽ <literal>(expr1) ? (expr2) : (expr3)</literal>£¬Èç¹û
<replaceable>expr1</replaceable> µÄֵΪ
&true;£¬Ôò´Ë±í´ïʽµÄֵΪ
<replaceable>expr2</replaceable>£¬Èç¹û
<replaceable>expr1</replaceable> µÄֵΪ
&false;£¬Ôò´Ë±í´ïʽµÄֵΪ <replaceable>expr3</replaceable>¡£
</para>
+ <para>
+ Çë²ÎÔĺ¯Êý
<function>strcasecmp</function>¡¢<function>strcmp</function>
¼°¡°<link
linkend="language.types">ÀàÐÍ</link>¡±µÄÓйØÕ½ڡ£
+ </para>
</sect1>
<sect1 id="language.operators.errorcontrol">
@@ -393,7 +409,7 @@
</simpara>
</note>
<simpara>
- ²Î¼û <function>error_reporting</function>¡£
+ ²Î¼û <function>error_reporting</function> ¼°ÊÖ²áÖС°<link
linkend="ref.errorfunc">´íÎó´¦Àí¼°ÈÕÖ¾º¯Êý</link>¡±µÄÓйØÕ½ڡ£
</simpara>
<note>
<para>
@@ -410,7 +426,7 @@
<sect1 id="language.operators.execution">
<title>Ö´ÐÐÔËËã·û</title>
<para>
- PHP
Ö§³ÖÒ»¸öÖ´ÐÐÔËËã·û£º·´ÒýºÅ£¨``£©¡£×¢ÒâÕâ²»Êǵ¥ÒýºÅ£¡PHP
½«³¢ÊÔ½«·´ÒýºÅÖеÄÄÚÈÝ×÷ΪÍâ¿ÇÃüÁîÀ´Ö´ÐУ¬²¢½«ÆäÊä³öÐÅÏ¢·µ»Ø£¨ÀýÈ磬¿ÉÒÔ¸³¸øÒ»¸ö±äÁ¿¶ø²»ÊǼòµ¥µØ¶ªÆúµ½±ê×¼Êä³ö£©¡£
+ PHP
Ö§³ÖÒ»¸öÖ´ÐÐÔËËã·û£º·´ÒýºÅ£¨`
£©¡£×¢ÒâÕâ²»Êǵ¥ÒýºÅ£¡PHP
½«³¢ÊÔ½«·´ÒýºÅÖеÄÄÚÈÝ×÷ΪÍâ¿ÇÃüÁîÀ´Ö´ÐУ¬²¢½«ÆäÊä³öÐÅÏ¢·µ»Ø£¨ÀýÈ磬¿ÉÒÔ¸³¸øÒ»¸ö±äÁ¿¶ø²»ÊǼòµ¥µØ¶ªÆúµ½±ê×¼Êä³ö£©¡£Ê¹Ó÷´ÒýºÅÔËËã·û¡°¡±µÄЧ¹ûÓ뺯Êý
<function>shell_exec</function> Ïàͬ¡£
<informalexample>
<programlisting role="php">
<![CDATA[
@@ -426,7 +442,7 @@
</para>
</note>
<para>
- ²Î¼û
<function>escapeshellcmd</function>£¬<function>exec</function>£¬<function>passthru</function>£¬<function>popen</function>£¬<function>shell_exec</function>
ºÍ <function>system</function>¡£
+ ²Î¼ûº¯Êý
<function>popen</function>¡¢<function>proc_open</function>
¼°ÊÖ²áÖС°<link
linkend="ref.exec">³ÌÐòÖ´Ðк¯Êý</link>¡±ºÍ¡°<link
linkend="features.commandline">ÔÚÃüÁîÐÐÖÐʹÓÃ
PHP</link>¡±µÄÓйØÕ½ڡ£
</para>
</sect1>
@@ -556,7 +572,7 @@
<sect1 id="language.operators.string">
<title>×Ö·û´®ÔËËã·û</title>
<simpara>
-
ÓÐÁ½¸ö×Ö·û´®ÔËËã·û¡£µÚÒ»¸öÊÇÁ¬½ÓÔËËã·û£¨¡°.¡±£©£¬Ëü·µ»ØÆä×óÓÒ²ÎÊýÁ¬½ÓºóµÄ×Ö·û´®¡£µÚ¶þ¸öÊÇÁ¬½Ó¸³ÖµÔËËã·û£¨¡°.=¡±£©£¬Ëü½«Óұ߲ÎÊý¸½¼Óµ½×ó±ßµÄ²ÎÊýºó¡£¸ü¶àÐÅÏ¢¼û<link
+
ÓÐÁ½¸ö<type>×Ö·û´®</type>ÔËËã·û¡£µÚÒ»¸öÊÇÁ¬½ÓÔËËã·û£¨¡°.¡±£©£¬Ëü·µ»ØÆä×óÓÒ²ÎÊýÁ¬½ÓºóµÄ×Ö·û´®¡£µÚ¶þ¸öÊÇÁ¬½Ó¸³ÖµÔËËã·û£¨¡°.=¡±£©£¬Ëü½«Óұ߲ÎÊý¸½¼Óµ½×ó±ßµÄ²ÎÊýºó¡£¸ü¶àÐÅÏ¢¼û<link
linkend="language.operators.assignment">¸³ÖµÔËËã·û</link>¡£
</simpara>
@@ -573,6 +589,9 @@
</programlisting>
</informalexample>
</para>
+ <para>
+ Çë²ÎÔÄÊÖ²áÖС°<link
linkend="language.types.string">×Ö·û´®ÀàÐÍ</link>¡±ºÍ¡°<link
linkend="ref.strings">×Ö·û´®º¯Êý</link>¡±µÄÓйØÕ½ڡ£
+ </para>
</sect1>
<sect1 id="language.operators.array">
@@ -607,6 +626,9 @@
</screen>
</informalexample>
</para>
+ <para>
+ Çë²ÎÔÄÊÖ²áÖС°<link
linkend="language.types.array">Êý×éÀàÐÍ</link>¡±ºÍ¡°<link
linkend="ref.array">Êý×麯Êý</link>¡±µÄÓйØÕ½ڡ£
+ </para>
</sect1>
</chapter>