Skip to content

Commit

Permalink
docs: FilesystemIterator, update output for php 8.2 and 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jawira committed Dec 16, 2022
1 parent aba8283 commit c2668d1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
14 changes: 12 additions & 2 deletions reference/spl/filesystemiterator/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,24 @@
<programlisting role="php">
<![CDATA[
<?php
$it = new FilesystemIterator(dirname(__FILE__));
$it = new FilesystemIterator(dirname(__FILE__), FilesystemIterator::CURRENT_AS_FILEINFO);
foreach ($it as $fileinfo) {
echo $fileinfo->getFilename() . "\n";
}
?>
]]>
</programlisting>
&example.outputs;
&example.outputs.82.similar;
<screen>
<![CDATA[
.
..
apples.jpg
banana.jpg
example.php
]]>
</screen>
<para>Output of the above example prior to PHP 8.2.0 is similar to:</para>
<screen>
<![CDATA[
apples.jpg
Expand Down
2 changes: 1 addition & 1 deletion reference/spl/filesystemiterator/current.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ foreach ($iterator as $fileinfo) {
?>
]]>
</programlisting>
&example.outputs.similar;
&example.outputs.82.similar;
<screen>
<![CDATA[
/www/examples/.
Expand Down
2 changes: 1 addition & 1 deletion reference/spl/filesystemiterator/key.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ foreach ($iterator as $fileinfo) {
?>
]]>
</programlisting>
&example.outputs.similar;
&example.outputs.82.similar;
<screen>
<![CDATA[
.
Expand Down
2 changes: 1 addition & 1 deletion reference/spl/filesystemiterator/setflags.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ foreach ($iterator as $key => $fileinfo) {
?>
]]>
</programlisting>
&example.outputs.similar;
&example.outputs.82.similar;
<screen>
<![CDATA[
Key as Pathname:
Expand Down

0 comments on commit c2668d1

Please sign in to comment.