Doc #76490 [Opn->Ver]: Documentation of Directory::read() makes no sense
| From: | cmb@php.net | Date: | Sun, 17 Jun 2018 20:28:22 +0000 |
| Subject: | Doc #76490 [Opn->Ver]: Documentation of Directory::read() makes no sense | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15784@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76490&edit=1
ID: 76490
Updated by: cmb@php.net
Reported by: teo8976 at gmail dot com
Summary: Documentation of Directory::read() makes no sense
-Status: Open
+Status: Verified
Type: Documentation Problem
Package: Documentation problem
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
> 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>).
Previous Comments:
------------------------------------------------------------------------
[2018-06-17 14:51:56] 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."
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76490&edit=1