torben          Wed May 23 20:31:35 2001 EDT

  Modified files:              
    /phpdoc/en/language operators.xml 
  Log:
  
  Fixed a typo and elucidated a bit on the use of @ with expressions.
  
  
Index: phpdoc/en/language/operators.xml
diff -u phpdoc/en/language/operators.xml:1.19 phpdoc/en/language/operators.xml:1.20
--- phpdoc/en/language/operators.xml:1.19       Wed May 23 16:44:35 2001
+++ phpdoc/en/language/operators.xml    Wed May 23 20:31:35 2001
@@ -267,7 +267,7 @@
      <programlisting role="php">
 &lt;?php
 /* Intentional file error */
-$my_file = @file ('non_esistent_file') or
+$my_file = @file ('non_existent_file') or
     die ("Failed opening file: error was '$php_errormsg'");
 
 // this works for any expression, not just functions:
@@ -280,7 +280,13 @@
    </para>
    <note>
     <simpara>
-     The @-operator doesn't work with foreach.
+     The @-operator works only on expressions. A simple rule of thumb
+     is: if you can take the value of something, you can prepend the @
+     operator to it. For instance, you can prepend it to variables,
+     function and <function>include</function> calls, constants, and
+     so forth. You cannot prepend it to function or class definitions,
+     or conditional structures such as <literal>if</literal> and
+     <literal>foreach</literal>, and so forth.
     </simpara>
    </note>
    <note>


Reply via email to