Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use is_dir() and is_file() instead of file_exists() #433

Open
staabm opened this issue Oct 17, 2020 · 1 comment
Open

Use is_dir() and is_file() instead of file_exists() #433

staabm opened this issue Oct 17, 2020 · 1 comment

Comments

@staabm
Copy link

staabm commented Oct 17, 2020

.. file_exists() is up to 100 times slower

Inspired by https://bugs.php.net/bug.php?id=78285

See also symfony/symfony#36493

@itsgoingd
Copy link
Owner

I've actually seen this before, but couldn't reproduce the improvement at the time. Will re-do some benchmarks myself, since the linked bug report looks pretty convincing. Thanks.

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

No branches or pull requests

2 participants