Re: [PHP4BETA] 'resource' data type
| From: | Zeev Suraski | Date: | Thu, 23 Dec 1999 04:58:33 +0000 |
| Subject: | Re: [PHP4BETA] 'resource' data type | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-8421@lists.php.net to get a copy of this message | ||
At 00:34 23/12/1999 , Mako Joe wrote:
Is there documentation on this anywhere? This isn't listed among the differences between PHP3 & PHP4. There is also no documentation on the function is_resource(). This seems to be a significant change in the language (an entirely new data type), it would seem appropriate to have some documentation on this issue. ThanksEither way, don't even consider checking return values of resource-returning functions with is_resource(). It was never promised that functions that returned integer handles, would not return an integer false in case of failure. All that was promised was that 'false' would be returned, and false can also be a 0 integer. To check return values of resource returning functions, simply check if it's not false (foo()!=false, or simply (foo())). Despite what Rasmus said, I don't think it's realistic that every new or modified aspect of PHP 4.0 is going to be documented before the final 4.0 release. It wasn't like that with 3.0, and it's never like that with opensource software. Docs are always a bit behind the actual code. Zeev -- Zeev Suraski <zeev@zend.com> http://www.zend.com/