realpath_cache_size, on a codebase with ten thousand files

PHP caches resolved paths and the default size is small enough to thrash on a modern dependency tree.

; the default: 4096 entries, 120 seconds
realpath_cache_size=4096k
realpath_cache_ttl=600

$ php -r 'print_r(realpath_cache_size());'
// and the entry count
$ php -r 'echo count(realpath_cache_get());'
8412        // against a 4096-entry default

Every miss is a stat syscall, and a framework autoloading four hundred classes across a deep vendor tree misses constantly. The effect is largest on a container with a bind-mounted volume, where each stat crosses a filesystem boundary — this is the single most effective PHP setting on a macOS development environment. In production with opcache and no timestamp validation it matters much less, which is why it is often set only where it is not needed.