Re: [PHP-DEV] Suggest similar names for undefined function/method/class errors

[email protected] ("Sjoerd Langkemper")
Newsgroups php.internals
Message-ID <[email protected]>
Hello Jorg,

On Tue, Aug 4, 2026, at 00:37, Jorg Sowa wrote:
> “did you mean …?” suggestions to errors for undefined functions. While it does not change language semantics, it changes error messages and introduces additional checks on error paths, so I would like to confirm whether consensus on the PR is sufficient or an RFC is expected.
> 

Thanks, this is great.

According to PHP Policy RFC: Exempt input type and value validation from BC Break policy <https://wiki.php.net/rfc/policy-exempt-type-value-error-bc-policy>, rephrasing error messages is not subject to the backwards compatibility break policy.

I think the amount of punctuation at the end is a bit much. Perhaps it would be clearer (although less strictly correct) to say "(did you mean func?)" instead of "(did you mean func()?)". But either way I am in favor of this.

Regards,

Sjoerd Langkemper
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.