Re: Throwing an Error for require expressions in PHP7.x
| From: | Rowan Collins | Date: | Wed, 15 Jun 2016 10:39:02 +0000 |
| Subject: | Re: Throwing an Error for require expressions in PHP7.x | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-93997@lists.php.net to get a copy of this message | ||
On 15/06/2016 11:27, Alexander Lisachenko wrote:
For PHP7 we have pretty errors for almost everything, even eval can throw a ParseError exception, but not for the require expressionAgree that this would be good. I don't know if there's a technical reason against it, or just that nobody's got round to it yet.
Can we also add FileNotFoundException and use it for all file functions to avoid silencing with "@" operator?This, however, is a completely different topic. It's one that's come up before, but not gained much traction, because it breaks an extremely large amount of existing code. I would suggest having a look in the list archives, and raising this as another topic if you can come up with a good plan for how it should work. Regards, -- Rowan Collins [IMSoP]