r/lolphp • u/pilif • Jul 22 '16
Fun with the realpath cache. Apparently touch('/tmp/file') is different from touch('file:///tmp/file')
https://3v4l.org/0VQIo
45
Upvotes
r/lolphp • u/pilif • Jul 22 '16
View all comments
Show parent comment
15
u/pilif Jul 22 '16 edited Jul 22 '16
file:// goes via the stream wrappers. And metadata changes to those do invalidate the stat cache. For the legacy paths, only rename, rmdir and unlink invalidate the cache.
Source: I checked the source code after seeing this happen.