Am 03.12.2020 um 09:27 schrieb Côme Chilliet <come.chill...@fusiondirectory.org>: > > Le Tue, 1 Dec 2020 12:06:22 -0800, > Stanislav Malyshev <smalys...@gmail.com> a écrit : > >> But it's not incorrect. if is_file("abc\0") returns false, it's correct >> - "abc\0" is not a correct filename, so I expect it to return false. It >> does exactly what I need, so it's correct. > > Hear hear. I think this is the best summary in this discussion. > > is_file and is_dir should just return false on values which are not files and > dirs. > > Can we please fix this for future PHP versions? > Does it need an RFC?
There is a PR for this which was approved by Nikita. But I'm not sure what the plan is on merging into master or other branches: https://github.com/php/php-src/pull/6478 <https://github.com/php/php-src/pull/6478> - Chris