Re: [RFC] Consistent type errors for internal functions
| From: | Ben Ramsey | Date: | Sat, 16 Feb 2019 18:37:19 +0000 |
| Subject: | Re: [RFC] Consistent type errors for internal functions | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-104450@lists.php.net to get a copy of this message | ||
> On Feb 16, 2019, at 12:28, Benjamin Eberlei <kontakt@beberlei.de> wrote:
>
> This exception is only for argument errors. Fopen would continue to warn + false when file
> doesnt exist, which is what @ is nostly used for (using fopen as example)
I’ve seen many cases where it’s understood that the function might receive the wrong type, and
the developer decides this is okay, so they use the @-operator to ignore the warning and allow the
script to continue processing.