philip          Tue Mar 18 04:21:07 2003 EDT

  Modified files:              
    /phpdoc/en/language operators.xml 
  Log:
  Added many links to other related sections of the manual,  expanded ternary 
  example, and a few other minor changes.
  
  
Index: phpdoc/en/language/operators.xml
diff -u phpdoc/en/language/operators.xml:1.45 phpdoc/en/language/operators.xml:1.46
--- phpdoc/en/language/operators.xml:1.45       Mon Mar 17 20:49:21 2003
+++ phpdoc/en/language/operators.xml    Tue Mar 18 04:21:07 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.45 $ -->
+<!-- $Revision: 1.46 $ -->
  <chapter id="language.operators">
   <title>Operators</title>
   <simpara>
@@ -179,7 +179,7 @@
    </simpara>
    <simpara>
     See also the manual page on 
-    <link linkend="ref.math">math functions</link>. 
+    <link linkend="ref.math">Math functions</link>. 
    </simpara>
 
    <!--
@@ -403,15 +403,31 @@
     <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> 
-    This expression evaluates to <replaceable>expr2</replaceable> if
+    The expression <literal>(expr1) ? (expr2) : (expr3)</literal>
+    evaluates to <replaceable>expr2</replaceable> if
     <replaceable>expr1</replaceable> evaluates to &true;, and
     <replaceable>expr3</replaceable> if
     <replaceable>expr1</replaceable> evaluates to &false;.
    </para>
+   <para>
+    See also <function>strcasecmp</function>,
+    <function>strcmp</function>, and the manual section on
+    <link linkend="language.types">Types</link>.
+   </para>
   </sect1>
 
   <sect1 id="language.operators.errorcontrol">
@@ -460,7 +476,8 @@
     </simpara>
    </note>
    <simpara>
-    See also <function>error_reporting</function>.
+    See also <function>error_reporting</function> and the manual section for
+    <link linkend="ref.errorfunc">Error Handling and Logging functions</link>.
    </simpara>
    <note>
     <para>
@@ -487,7 +504,8 @@
     these are not single-quotes! PHP will attempt to execute the
     contents of the backticks as a shell command; the output will be
     returned (i.e., it won't simply be dumped to output; it can be
-    assigned to a variable).
+    assigned to a variable).  Use of the backtick operator is identical 
+    to <function>shell_exec</function>. 
     <informalexample>
      <programlisting role="php">
 <![CDATA[
@@ -504,9 +522,11 @@
     </para>
    </note>
    <para>
-    See also <function>escapeshellcmd</function>, <function>exec</function>,
-    <function>passthru</function>, <function>popen</function>,
-    <function>shell_exec</function>, and <function>system</function>.
+    See also the manual section on <link linkend="ref.exec">Program
+    Execution functions</link>, <function>popen</function>
+    <function>proc_open</function>, and
+    <link linkend="features.commandline">Using PHP from the
+    commandline</link>.
    </para>
   </sect1>
 
@@ -640,9 +660,9 @@
   <sect1 id="language.operators.string">
    <title>String Operators</title>
    <simpara>
-    There are two string operators. The first is the concatenation
-    operator ('.'), which returns the concatenation of its right and
-    left arguments. The second is the concatenating assignment
+    There are two <type>string</type> operators. The first is the
+    concatenation operator ('.'), which returns the concatenation of its
+    right and left arguments. The second is the concatenating assignment
     operator ('.='), which appends the argument on the right side to
     the argument on the left side. Please read <link
     linkend="language.operators.assignment">Assignment
@@ -662,6 +682,11 @@
      </programlisting>
     </informalexample>
    </para>
+   <para>
+    See also the manual sections on the 
+    <link linkend="language.types.string">String type</link> and 
+    <link linkend="ref.strings">String functions</link>.
+   </para>
   </sect1>
   
   <sect1 id="language.operators.array">
@@ -697,6 +722,11 @@
 ]]>
        </screen>
     </informalexample>
+   </para>
+   <para>
+    See also the manual sections on the 
+    <link linkend="language.types.array">Array type</link> and 
+    <link linkend="ref.array">Array functions</link>.
    </para>
   </sect1>
  </chapter>



-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to