Skip to content

Strange default parameters in callback signature for set_error_handler #5436

@bug-fix0r

Description

@bug-fix0r

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDocumentation contains incorrect information

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions