Doc #81677 [Com]: realpath result is cached

From: Date: Thu, 24 Nov 2022 04:27:54 +0000
Subject: Doc #81677 [Com]: realpath result is cached
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-19485@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:         ramni14256 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.mypepsico.me/)github.com


Previous Comments:
------------------------------------------------------------------------
[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


Thread (10 messages)

« previous php.doc.bugs (#19485) next »