Re: Remove $this from incompatible context
| From: | Rowan Collins | Date: | Thu, 12 Feb 2015 16:53:05 +0000 |
| Subject: | Re: Remove $this from incompatible context | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-82547@lists.php.net to get a copy of this message | ||
François Laupretre wrote on 12/02/2015 14:56:
Sorry to get off-topic but could we raise the 'undefined variable' error to E_WARNING, at least ? E_NOTICE seems very low for such an error.I think the division between E_NOTICE and E_WARNING is a bit arbitrary sometimes, but without a good definition of the difference, I think it's unhelpful to introduce "inflation" by raising severities. Don't forget that while an undefined variable is sometimes an error, it's sometimes just poor coding style, and the user is consciously relying on the implicit null (e.g. $count++, or $hash[$key] = $value, or even echo $hash[$key]). Perhaps what's needed is a survey of current messages, and an RFC to reclassify them based on some consistent definitions? Regards, -- Rowan Collins [IMSoP]