jmcastagnetto           Fri Mar 16 23:13:33 2001 EDT

  Modified files:              
    /phpdoc/en/functions        info.xml 
  Log:
  updated docs for get_required_files/get_included_files to reflect the
  changes in PHP 4.0.4
  
  
Index: phpdoc/en/functions/info.xml
diff -u phpdoc/en/functions/info.xml:1.40 phpdoc/en/functions/info.xml:1.41
--- phpdoc/en/functions/info.xml:1.40   Fri Mar  9 07:33:03 2001
+++ phpdoc/en/functions/info.xml        Fri Mar 16 23:13:33 2001
@@ -1103,8 +1103,8 @@
    <refnamediv>
     <refname>get_required_files</refname>
     <refpurpose>
-     Returns an array with the names of the files require_once()'d in
-     a script
+     Returns an array with the names of the files require_once()'d or
+     included_once()'d in a script
     </refpurpose>
    </refnamediv>
    <refsect1>
@@ -1116,64 +1116,24 @@
      </funcprototype>
     </funcsynopsis>
     <para>
-     This function returns an associtative array of the names of all
+     This function returns an array of the names of all
      the files that have been loaded into a script using
-     <function>require_once</function>. The indexes of the array are
-     the file names as used in the <function>require_once</function>
-     without the &quot;.php&quot; extension.
+     <function>require_once</function> or <function>include_once</function>. 
     </para>
+    <note>
+     <para>
+      In PHP 4.0.1pl2 this function assumed that the
+      <varname>required_once</varname> files end in the extension
+      &quot;.php&quot;, other extensions do not work. Also, in that
+      version the array returned was an associative array, and this
+      function was not an alias for <function>get_included_files</function>
+     </para>
+     <para>
+      As of PHP 4.0.4, this function is an alias for
+      <function>get_included_files</function>
+     </para>
+    </note>
     <para>
-     The example below
-     <example>
-      <title>Printing the required and included files</title>
-      <programlisting>
-&lt;?php
-
-require_once (&quot;local.php&quot;);
-require_once (&quot;../inc/global.php&quot;);
-
-for ($i=1; $i&lt;5; $i++)
-  include &quot;util&quot;.$i.&quot;php&quot;;
-
-  echo &quot;Required_once files\n&quot;;
-  print_r (get_required_files());
-
-  echo &quot;Included_once files\n&quot;;
-  print_r (get_included_files());
-?&gt;
-      </programlisting>
-     </example>
-     will generate the following output:
-     <informalexample>
-      <programlisting>
-Required_once files
-Array
-(
-  [local] =&gt; local.php 
-  [../inc/global] =&gt; /full/path/to/inc/global.php
-)
-
-Included_once files
-Array
-(
-    [util1] =&gt; util1.php 
-    [util2] =&gt; util2.php 
-    [util3] =&gt; util3.php 
-    [util4] =&gt; util4.php 
-)
-      </programlisting>
-     </informalexample>
-    </para>
-    <para>
-     <note>
-      <para>
-       As of PHP 4.0.1pl2 this function assumes that the
-       <varname>required_once</varname> files end in the extension
-       &quot;.php&quot;, other extensions do not work.
-      </para>
-     </note>
-    </para>
-    <para>
      See also: <function>require_once</function>,
      <function>include_once</function>,
      <function>get_included_files</function>
@@ -1198,21 +1158,53 @@
      </funcprototype>
     </funcsynopsis>
     <para>
-     This function returns an associtative array of the names of all
-     the files that have been loaded into a script using
-     <function>include_once</function>. The indexes of the array are
-     the file names as used in the <function>include_once</function>
-     without the &quot;.php&quot; extension.
+     This function returns an array of the names of all
+     the files that have been loaded into a script using 
+     <function>require_once</function> or
+     <function>include_once</function>. 
     </para>
     <para>
-     <note>
-      <para>
-       As of PHP 4.0.1pl2 this function assumes that the
-       <varname>include_once</varname> files end in the extension
-       &quot;.php&quot;, other extensions do not work.
-      </para>
-     </note>
+     The example below
+     <example>
+      <title>Printing the required and included files</title>
+      <programlisting>
+&lt;?php
+
+require_once (&quot;local.php&quot;);
+require_once (&quot;../inc/global.php&quot;);
+
+for ($i=1; $i&lt;5; $i++)
+  include &quot;util&quot;.$i.&quot;php&quot;;
+
+  echo &quot;Required_once/Included_once files\n&quot;;
+  print_r (get_required_files());
+      </programlisting>
+     </example>
+     will generate the following output:
+     <informalexample>
+      <programlisting>
+Required_once/Included_once files
+Array
+(
+  [0] =&gt; local.php 
+  [1] =&gt; /full/path/to/inc/global.php
+  [2] =&gt; util1.php 
+  [3] =&gt; util2.php 
+  [4] =&gt; util3.php 
+  [5] =&gt; util4.php 
+)
+      </programlisting>
+     </informalexample>
     </para>
+    <note>
+     <para>
+      In PHP 4.0.1pl2 this function assumed that the
+      <varname>include_once</varname> files end in the extension
+      &quot;.php&quot;, other extensions do not work. Also, in that
+      version the array returned was an associative array, and 
+      listed only the included files.
+     </para>
+    </note>
     <para>
      See also: <function>require_once</function>,
      <function>include_once</function>,


Reply via email to