Tag: splfileinfo

  • PHP SplFileInfo string values

    Whilst PHP’s documentation of SplFileInfo isn’t “bad” as such, it can be tricky to remember what string functions (such as getBasename, getExtension, getFilename, getPath, getPathname, getRealPath and __toString) return under which circumstances. Hence this post! To generate this data, we’re going to start off with a RecursiveDirectoryIterator with an optional callback filter (to enable us […]