filesize() to return size of symlink rather than the target file size
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Description
filesize() returns false on symlink with warning: filesize(): stat failed for {filename}
I have to use lstat($symlink)['size'] to get size of a symlink
PHP Version
PHP 8.3.8
Operating System
CentOS Stream release 9
Edit by @cmb69: see https://github.com/php/doc-en/issues/3598#issuecomment-2245268263 for the latest suggestion to improve the documentation.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the latest suggestion in the linked issue comment, then use the PHP documentation for filesize() and lstat() as the entry point. Clarify the documented behavior for symlinks and the appropriate function to obtain a symlink's own size; done means the relevant documentation reflects that behavior accurately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100