A "void" function is only checked at compile time, and may still throw
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Affected page
https://www.php.net/manual/en/language.types.void.php
Current issue
- There is no mention that a "void" function is only checked by the compiler. And that the check is that "return expression;" is forbidden for a void function.
- There is no mention that no type inference is performed.
- There is no mention that a "void" function will never produce a TypeError at runtime.
- There is no mention that a "void" function can still throw an Exception.
- There is no mention that "void" is not a type, but only a return-only type.
Suggested improvement
Mention these 5 points, because they are really important.
Additional context (optional)
No response
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
Open the affected PHP manual page at language.types.void.php and read the existing explanation of void functions. Update the page to cover compiler-only checking, the prohibition on return expressions, lack of type inference, runtime TypeError behavior, exceptions, and void as a return-only type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100