PHP Function Reference

PHP realpath_cache_get() Function



The PHP realpath_cache_get() function returns the contents of the realpath cache.

Syntax

realpath_cache_get()

Parameters

No parameter is required.

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:

The example below shows the usage of realpath_cache_get() function.

<?php
print_r(realpath_cache_get());
?>

The output of the above code will be similar to:

Array
(
    [] => Array
        (
            [key] => 1438560323331296433
            [is_dir] => 1
            [realpath] => 
            [expires] => 1633492446
        )

    [] => Array
        (
            [key] => 1.5408950988325E+19
            [is_dir] => 1
            [realpath] => 
            [expires] => 1633492446
        )

    [] => Array
        (
            [key] => 1.4018905533745E+19
            [is_dir] => 1
            [realpath] => 
            [expires] => 1633492446
        )

    [/var] => Array
        (
            [key] => 1.6710127960665E+19
            [is_dir] => 1
            [realpath] => /var
            [expires] => 1633492446
        )

    [] => Array
        (
            [key] => 1.0347823316857E+19
            [is_dir] => 1
            [realpath] => 
            [expires] => 1633492446
        )

    [Main.php] => Array
        (
            [key] => 2737687820932405122
            [is_dir] => 
            [realpath] => Main.php
            [expires] => 1633492446
        )

)

❮ PHP Filesystem Reference