Doc #81677 [Com]: realpath result is cached
| From: | janettabloomquist at gmail dot com | Date: | Fri, 23 Dec 2022 10:02:52 +0000 |
| Subject: | Doc #81677 [Com]: realpath result is cached | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-19525@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81677&edit=1
ID: 81677
Comment by: janettabloomquist at gmail dot com
Reported by: jozef dot briss at gmail dot com
Summary: realpath result is cached
Status: Verified
Type: Documentation Problem
Package: Filesystem function related
Operating System: Linux
PHP Version: 7.4.26
Block user comment: N
Private report: N
New Comment:
realpath_cache is the system that allows php to cache paths to locations of files/directories you
are using to minimize expensive disk lookups. It could possibly greatly improve performance of you
PHP application/site if you use alot of relative file paths PHP has to parse/lookup each time you
reference them.
(https://www.mysanfordchart.net/)github.com
Previous Comments:
------------------------------------------------------------------------
[2022-11-28 03:36:20] ramaha256 at gmail dot com
realpath_cache is the system that allows php to cache paths to locations of files/directories you
are using to minimize expensive disk lookups.
(https://www.myhtspace.org/)github.com
------------------------------------------------------------------------
[2021-12-01 10:50:04] cmb@php.net
> Realpath function is using realpath_cache.
While this shouldn't be surprising, I agree that the documentation
of the realpath cache (and also the stat chache) could be
improved.
------------------------------------------------------------------------
[2021-11-30 17:31:18] jozef dot briss at gmail dot com
Description:
------------
Realpath function is using realpath_cache. This is not documented anywhere.
Test script:
---------------
<?php
exec("ln -nsf test1 test");
echo realpath("test") . "\n";
exec("ln -nsf test2 test");
echo realpath("test") . "\n";
Expected result:
----------------
/home/****/realpath/test1
/home/****/realpath/test2
Actual result:
--------------
/home/****/realpath/test1
/home/****/realpath/test1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81677&edit=1