jimw            Mon Dec 17 18:00:19 2001 EDT

  Modified files:              
    /phpdoc/en/language control-structures.xml 
  Log:
  don't use .inc extension in examples
  
Index: phpdoc/en/language/control-structures.xml
diff -u phpdoc/en/language/control-structures.xml:1.46 
phpdoc/en/language/control-structures.xml:1.47
--- phpdoc/en/language/control-structures.xml:1.46      Wed Dec 12 15:47:37 2001
+++ phpdoc/en/language/control-structures.xml   Mon Dec 17 18:00:19 2001
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.46 $ -->
+<!-- $Revision: 1.47 $ -->
  <chapter id="control-structures">
   <title>Control Structures</title>
 
@@ -1033,7 +1033,7 @@
     <informalexample>
      <programlisting role="php">
 <![CDATA[
-require ('header.inc');
+require ('header.php');
 ]]>
      </programlisting>
     </informalexample>
@@ -1130,7 +1130,7 @@
     <informalexample>
      <programlisting role="php">
 <![CDATA[
-$files = array ('first.inc', 'second.inc', 'third.inc');
+$files = array ('first.php', 'second.php', 'third.php');
 for ($i = 0; $i < count($files); $i++) {
     include $files[$i];
 }
@@ -1193,7 +1193,7 @@
     <title><function>include</function> in PHP 3 and PHP 4</title>
     <para>
      Assume the existence of the following file (named
-     <filename>test.inc</filename>) in the same directory as the main
+     <filename>test.php</filename>) in the same directory as the main
      file:
      <programlisting role="php">
 <![CDATA[
@@ -1213,7 +1213,7 @@
      <programlisting role="php">
 <![CDATA[
 <?php
-$retval = include ('test.inc');
+$retval = include ('test.php');
 echo "File returned: '$retval'<br>\n";
 ?>
 ]]>
@@ -1235,7 +1235,7 @@
      <programlisting role="php">
 <![CDATA[
 <?php
-include ('test.inc');
+include ('test.php');
 echo "Back in main.html<br>\n";
 ?>
 ]]>
@@ -1258,7 +1258,7 @@
     <para>
      The above parse error is a result of the fact that the
      <literal>return</literal> statement is enclosed in a non-function
-     block within <filename>test.inc</filename>. When the return is
+     block within <filename>test.php</filename>. When the return is
      moved outside of the block, the output is:
      <screen>
 Before the return
@@ -1336,9 +1336,9 @@
    </para>
    <para>
      For example, if you create the following 2 include files
-     <literal>utils.inc</literal> and <literal>foolib.inc</literal>
+     <literal>utils.php</literal> and <literal>foolib.php</literal>
      <example>
-     <title>utils.inc</title>
+     <title>utils.php</title>
      <programlisting role="php">
 <![CDATA[
 <?php
@@ -1353,11 +1353,11 @@
      </programlisting>
      </example>
      <example>
-     <title>foolib.inc</title>
+     <title>foolib.php</title>
      <programlisting role="php">
 <![CDATA[
 <?php
-require ("utils.inc");
+require ("utils.php");
 function showVar($var)
 {
     if (PHPVERSION == 4) {
@@ -1378,12 +1378,12 @@
      <programlisting role="php">
 <![CDATA[
 <?php
-require("foolib.inc");
+require("foolib.php");
 /* the following will generate an error */
-require("utils.inc");
+require("utils.php");
 $foo = array("1",array("complex","quaternion"));
-echo "this is requiring utils.inc again which is also\n";
-echo "required in foolib.inc\n";
+echo "this is requiring utils.php again which is also\n";
+echo "required in foolib.php\n";
 echo "Running goodTea: ".goodTea()."\n";
 echo "Printing foo: \n";
 showVar($foo);
@@ -1399,21 +1399,21 @@
 GLOBALS ARE NICE
 GLOBALS ARE NICE
 
-Fatal error:  Cannot redeclare goodTea() in utils.inc on line 5
+Fatal error:  Cannot redeclare goodTea() in utils.php on line 5
 ]]>
      </screen>
      </informalexample>
-     By modifying <literal>foolib.inc</literal> and
+     By modifying <literal>foolib.php</literal> and
      <literal>cause_errror_require.php</literal>
      to use <function>require_once</function>
      instead of <function>require</function> and renaming the
      last one to <literal>avoid_error_require_once.php</literal>, we have:
      <example>
-     <title>foolib.inc (fixed)</title>
+     <title>foolib.php (fixed)</title>
      <programlisting role="php">
 <![CDATA[
 ...
-require_once("utils.inc");
+require_once("utils.php");
 function showVar($var)
 {
 ...
@@ -1425,8 +1425,8 @@
      <programlisting role="php">
 <![CDATA[
 ...
-require_once("foolib.inc");
-require_once("utils.inc");
+require_once("foolib.php");
+require_once("utils.php");
 $foo = array("1",array("complex","quaternion"));
 ...
 ]]>
@@ -1437,8 +1437,8 @@
      <screen>
 <![CDATA[
 GLOBALS ARE NICE
-this is requiring globals.inc again which is also
-required in foolib.inc
+this is requiring globals.php again which is also
+required in foolib.php
 Running goodTea: Oolong tea tastes good!
 Printing foo:
 Array


Reply via email to