php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76490 Documentation of Directory::read() makes no sense
Submitted: 2018-06-17 14:51 UTC Modified: 2018-06-18 10:54 UTC
From: teo8976 at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: teo8976 at gmail dot com
New email:
PHP Version: OS:

 

 [2018-06-17 14:51 UTC] teo8976 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/directory.read
---

All it says is:
"Same as readdir(), only dir_handle defaults to $this."

That makes no sense whatsoever. readdir() expects a RESOURCE as the 'dir_handle' argument, not an object of class Directory, so there's no way that statement can be true, unless readdir($dir_handle) can also accept a Directory object as handle, which is not documented. If that is the case, then it should be properly documented in  http://php.net/manual/en/function.readdir.php

Perhaps that was meant to read:
"Same as readdir(), only dir_handle defaults to $this->handle."


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-06-17 20:28 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2018-06-17 20:28 UTC] cmb@php.net
> Perhaps that was meant to read:
> "Same as readdir(), only dir_handle defaults to $this->handle."

That (cf. <https://github.com/php/php-src/blob/php-7.2.6/ext/standard/dir.c#L76>).
 [2018-06-18 10:54 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=345164
Log: Fix #76490: Documentation of Directory::read() makes no sense
 [2018-06-18 10:54 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-06-18 10:54 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=57177f415976f0c37afacfdaac08269fc568d672
Log: Fix #76490: Documentation of Directory::read() makes no sense
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Wed Oct 07 23:00:01 2026 UTC