didou Tue Sep 7 10:25:39 2004 EDT
Modified files:
/phpdoc/en/reference/filesystem/functions glob.xml
Log:
don't use glob in a foreach
http://cvs.php.net/diff.php/phpdoc/en/reference/filesystem/functions/glob.xml?r1=1.15&r2=1.16&ty=u
Index: phpdoc/en/reference/filesystem/functions/glob.xml
diff -u phpdoc/en/reference/filesystem/functions/glob.xml:1.15
phpdoc/en/reference/filesystem/functions/glob.xml:1.16
--- phpdoc/en/reference/filesystem/functions/glob.xml:1.15 Sat Jul 3 05:41:30
2004
+++ phpdoc/en/reference/filesystem/functions/glob.xml Tue Sep 7 10:25:39 2004
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.15 $ -->
+<!-- $Revision: 1.16 $ -->
<refentry id="function.glob">
<refnamediv>
<refname>glob</refname>
@@ -79,9 +79,12 @@
<programlisting role="php">
<![CDATA[
<?php
-foreach (glob("*.txt") as $filename) {
+
+$files = glob("*.txt");
+foreach ($files as $filename) {
echo "$filename size " . filesize($filename) . "\n";
}
+
?>
]]>
</programlisting>