Re: Re: Resource typehint and return type
| From: | Ben Scholzen 'DASPRiD' | Date: | Mon, 23 Nov 2015 19:07:51 +0000 |
| Subject: | Re: Re: Resource typehint and return type | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-89343@lists.php.net to get a copy of this message | ||
On 23.11.2015 16:30, Rowan Collins wrote:
I believe the blocker on just rushing to convert existing resources into objects is that there are functions like is_resource() and getttype() which will start behaving differently.There's another blocker: the SplFileObject currently has no fclose() method, which should definitely be implemented. Currently it relies on being destroyed to close the internal resource. In case of cross references, there's no way to explicitly close the file handle. May I suggest to implement fclose() in SplFileObject for now to bring it in line with the plain functions? I'd say that when fclose() was called on an SplFileObject and e.g. an fwrite(), fread() or the like call is made on the object, it throw's an exception? -- Ben Scholzen 'DASPRiD' Community Review Team Member | mail@dasprids.de Zend Framework | http://www.dasprids.de