|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37603 __FILE__ dereferences symlinks
Submitted: 2006-05-26 14:55 UTC Modified: 2006-05-26 15:02 UTC
From: dmitry at rsl dot ru Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 4.4.2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: dmitry at rsl dot ru
New email:
PHP Version: OS:


 [2006-05-26 14:55 UTC] dmitry at rsl dot ru
I have test2.php file, which is symlink to test.php
test.php is:
<?=__FILE__; ?>

No matter which file is executed, the result is the same
[dvereschaka@ns test1]$ php test.php ; php test2.php

Reproduce code:
<?=__FILE__; ?>

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-26 15:02 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at

 [2018-01-25 21:50 UTC] jacob at gnu dot org
Looking forward to a workaround for this issue.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Jun 09 11:03:41 2023 UTC