philip          Tue Apr  2 22:22:17 2002 EDT

  Modified files:              
    /phpdoc/en/appendices       phpdevel.xml 
    /phpdoc/en/functions        errorfunc.xml 
  Log:
  error_reporting: Document E_ALL.  Rewrite second example for only PHP 4.
  
  
Index: phpdoc/en/appendices/phpdevel.xml
diff -u phpdoc/en/appendices/phpdevel.xml:1.18 phpdoc/en/appendices/phpdevel.xml:1.19
--- phpdoc/en/appendices/phpdevel.xml:1.18      Fri Feb  8 08:40:44 2002
+++ phpdoc/en/appendices/phpdevel.xml   Tue Apr  2 22:22:17 2002
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.18 $ -->
+<!-- $Revision: 1.19 $ -->
 <appendix id="phpdevel">
  <title>Extending PHP 3</title>
 
@@ -880,6 +880,14 @@
      This is like an E_NOTICE, except it is generated by using the PHP
      function <function>trigger_error</function>. Functions should not 
      generate this type of error.
+   </simpara>
+  </sect2>
+  
+  <sect2 id="internal.e-all">
+   <title>E_ALL</title>
+   <simpara>
+    All of the above.  Using this error_reporting level will show 
+    all error types.
    </simpara>
   </sect2>
 
Index: phpdoc/en/functions/errorfunc.xml
diff -u phpdoc/en/functions/errorfunc.xml:1.26 phpdoc/en/functions/errorfunc.xml:1.27
--- phpdoc/en/functions/errorfunc.xml:1.26      Fri Feb 15 06:00:38 2002
+++ phpdoc/en/functions/errorfunc.xml   Tue Apr  2 22:22:17 2002
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.26 $ -->
+<!-- $Revision: 1.27 $ -->
  <reference id="ref.errorfunc">
   <title>Error Handling and Logging Functions</title>
   <titleabbrev>Errors and Logging</titleabbrev>
@@ -237,6 +237,12 @@
           <link linkend="internal.e-user-error">E_USER_NOTICE</link>
          </entry>
         </row>
+       <row>
+        <entry>2047</entry>
+        <entry>
+         <link linkend="internal.e-all">E_ALL</link>
+        </entry>
+       </row>
        </tbody>
       </tgroup>
      </table>
@@ -246,24 +252,18 @@
       <title><function>error_reporting</function> examples</title>
       <programlisting role="php">
 <![CDATA[
+// Turn off all error reporting
 error_reporting(0);
-/* Turn off all reporting */
 
-/* Examples are presented firdt in the old sxtax (for PHP 2/3)
- * and  the new - and adviced - syntax for PHP 3/4
- */
-
-error_reporting (7);
+// Report simple running errors
 error_reporting  (E_ERROR | E_WARNING | E_PARSE);
-/* Good to use for simple running errors  */
 
-error_reporting  (15);
+// Reporting E_NOTICE can be good too (to report uninitialized 
+// variables or catch variable name misspellings)
 error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
-/*  good for code authoring to report uninitialized or (possibly mis-spelled) 
variables */
 
-error_reporting (63);
+// Report all PHP errors (use bitwise  63  in PHP 3)
 error_reporting (E_ALL);
-/* report all PHP errors */
 ]]>
       </programlisting>
      </example>


Reply via email to