realpath_cache_get()
realpath_cache_get() — Get realpath cache entries.
Built-in function of PHP 8.5. The manual lists it as available in PHP 5 >= 5.3.2, PHP 7, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.
Signature
realpath_cache_get(): array
Parameters
This function takes no parameters.
Return value
Returns an array of realpath cache entries. The keys are original path entries, and the values are arrays of data items, containing the resolved path, expiration date, and other options kept in the cache.
Example
A runnable snippet:
var_dump(realpath_cache_get());
Output:
array(2) { ["/test"]=> array(4) { ["key"]=> int(123456789) ["is_dir"]=> bool(true) ["realpath"]=> string(5) "/test" ["expires"]=> int(1260318939) } ["/test/test.php"]=> array(4) { ["key"]=> int(987654321) ["is_dir"]=> bool(false) ["realpath"]=> string(12) "/root/test.php" ["expires"]=> int(1260318939) } }
See also
All PHP 8.5 built-in functions
Reference card built from the PHP manual page realpath_cache_get() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.