Re: Error instead of returning false
| From: | Stephen Reay | Date: | Wed, 08 May 2019 07:41:20 +0000 |
| Subject: | Re: Error instead of returning false | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-105639@lists.php.net to get a copy of this message | ||
> On 7 May 2019, at 22:15, Claude Pache <claude.pache@gmail.com> wrote:
>
> If you do think that ideally an exception should be thrown here, it is better to devise a new
> function—and, while you’re at it, a function that returns an object of some definite class
> instead of a resource.
Isn’t this exactly what SplFileObject / SplFileInfo::openFile is for?