|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #81677 realpath result is cached
Submitted: 2021-11-30 17:31 UTC Modified: 2021-12-01 10:50 UTC
Avg. Score:2.7 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: jozef dot briss at gmail dot com Assigned:
Status: Verified Package: Filesystem function related
PHP Version: 7.4.26 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: jozef dot briss at gmail dot com
New email:
PHP Version: OS:


 [2021-11-30 17:31 UTC] jozef dot briss at gmail dot com
Realpath function is using realpath_cache. This is not documented anywhere.

Test script:

exec("ln -nsf test1 test");
echo realpath("test") . "\n";
exec("ln -nsf test2 test");
echo realpath("test") . "\n";

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-12-01 10:50 UTC]
-Status: Open +Status: Verified -Type: Bug +Type: Documentation Problem
 [2021-12-01 10:50 UTC]
> 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
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sun Nov 27 08:05:54 2022 UTC