You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You will see that is_dir uses newfstatat syscall which indicates that it's using stat cache.
While file_exists uses access syscall which indicates it's not using stat cache.
Affected page
https://www.php.net/manual/en/function.file-exists.php
https://www.php.net/manual/en/function.is-readable.php
https://www.php.net/manual/en/function.is-writable.php
Issue description
In the notes section of all three links it says the function is using stat cache but it isn't.
When you run on Linux:
strace php --run "echo is_dir('moh123');" 2>&1 | grep moh123
strace php --run "echo file_exists('moh123');" 2>&1 | grep moh123
You will see that is_dir uses newfstatat syscall which indicates that it's using stat cache.
While file_exists uses access syscall which indicates it's not using stat cache.
Steps to reproduce
Suggested fix
Remove stat cache note.
I'm using Debian and PHP 8.2.28
The text was updated successfully, but these errors were encountered: