svn: /phpdoc/en/trunk/reference/spl/ directoryiterator/current.xml filesystemiterator/current.xml
| From: | Peter Cowburn | Date: | Sun, 01 Jun 2014 13:10:36 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/spl/ directoryiterator/current.xml filesystemiterator/current.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-12501@lists.php.net to get a copy of this message | ||
salathe Sun, 01 Jun 2014 13:10:36 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=333665
Log:
Let's use __DIR__
Patch by André Fiedler
Changed paths:
U phpdoc/en/trunk/reference/spl/directoryiterator/current.xml
U phpdoc/en/trunk/reference/spl/filesystemiterator/current.xml
Modified: phpdoc/en/trunk/reference/spl/directoryiterator/current.xml
===================================================================
--- phpdoc/en/trunk/reference/spl/directoryiterator/current.xml 2014-06-01 13:09:59 UTC (rev 333664)
+++ phpdoc/en/trunk/reference/spl/directoryiterator/current.xml 2014-06-01 13:10:36 UTC (rev 333665)
@@ -41,7 +41,7 @@
<programlisting role="php">
<![CDATA[
<?php
-$iterator = new DirectoryIterator(dirname(__FILE__));
+$iterator = new DirectoryIterator(__DIR__);
while($iterator->valid()) {
$file = $iterator->current();
echo $iterator->key() . " => " . $file->getFilename() . "\n";
Modified: phpdoc/en/trunk/reference/spl/filesystemiterator/current.xml
===================================================================
--- phpdoc/en/trunk/reference/spl/filesystemiterator/current.xml 2014-06-01 13:09:59 UTC (rev
333664)
+++ phpdoc/en/trunk/reference/spl/filesystemiterator/current.xml 2014-06-01 13:10:36 UTC (rev
333665)
@@ -43,7 +43,7 @@
<programlisting role="php">
<![CDATA[
<?php
-$iterator = new FilesystemIterator(dirname(__FILE__), FilesystemIterator::CURRENT_AS_PATHNAME);
+$iterator = new FilesystemIterator(__DIR__, FilesystemIterator::CURRENT_AS_PATHNAME);
foreach ($iterator as $fileinfo) {
echo $iterator->current() . "\n";
}