PHP’s stat cache often behaves differently from what developers expect. Do you k...

@Tideways@phpc.social

PHP’s stat cache often behaves differently from what developers expect. Do you know what it actually remembers?

It was built for repeated file system operations on the same file. In rare cases, it returns stale data, and your code needs clearstatcache().

We explain how it works, which functions use it, and whether it’s a useful optimization or technical debt:
tideways.com/profiler/blog/the

#PHP #WebPerformance #WebDevelopment #Programming #Linux