mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
don't use glob in a foreach
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@168128 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
d0a43c5f95
commit
49cbe807b0
1 changed files with 5 additions and 2 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue