Strange default parameters in callback signature for set_error_handler
Nobody has claimed this yet.
- Dominant language
- XML
- Stars
- 596
- Forks
- 890
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 55
Description
Affected page
https://www.php.net/manual/en/function.set-error-handler.php
Issue description
In set_error_handler doc what is the point of having default parameters in the callback (for errfile, errline, errcontext) and also what does the question mark mean?
handler( int $errno, string $errstr, string $errfile = ?, int $errline = ?, array $errcontext = ? ): bool
Steps to reproduce
No response
Suggested fix
Remove default parameters
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
Start by locating the source for the affected set_error_handler page in php/doc-en and inspect the callback signature shown in the issue. Remove the default parameters as proposed, then verify that the rendered signature no longer shows them and that the question-mark notation is no longer presented ambiguously.
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
- 55/100