-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
https://www.php.net/manual/en/function.rewinddir.php
PHP documentation for rewinddir() has a bug: return type is not void, but is null or false (see https://www.php.net/manual/en/function.rewinddir.php#refsect1-function.rewinddir-returnvalues).
Example:
$handle = opendir(__DIR__);
var_dump(rewinddir($handle)); // NULL
closedir($handle);
var_dump(rewinddir($handle)); // false with an E_WARNING triggeredIt seems that phpstan follow the documentation, because the example above will trigger this error with phpstan:
Result of function rewinddir (void) is used.
Tested on PHP 7.1.0, 7.2.0, 7.3.0 and 7.4.0.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels