Skip to content

Conversation

@Girgias
Copy link
Member

@Girgias Girgias commented Nov 10, 2025

Include 8.5 deprecation for passing null to use the last opened directory.

Include 8.5 deprecation for passing null to use the last opened directory.
@mumumu mumumu added this to the PHP 8.5 milestone Nov 10, 2025
Comment on lines +93 to +101
<simpara>
Because file and directory names can be strings that PHP considers "falsy"
(e.g. a directory named <literal>"0"</literal>) and
<function>readdir</function> returns &false; when it has read all entries
in a directory one needs to use the <literal>===</literal>
<link linkend="language.operators.comparison">comparison operator</link>
to properly distinguish between a directory entry whose name is "falsy"
and having read all entries of the directory.
</simpara>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this need to be a warning or a note?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess so, maybe could even be a caution.

@Girgias Girgias merged commit 5c7e9e1 into php:master Nov 27, 2025
2 checks passed
@Girgias Girgias deleted the dir-deprecations branch November 27, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants