Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 199912

Re: [PHP4BETA] 'resource' data type From: Zeev Suraski (zeev <email protected>)
Date: 12/22/99

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.
>Thanks

Either 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 <email protected>>  http://www.zend.com/

-- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe <email protected> For additional commands, e-mail: php4beta-help <email protected> To contact the list administrators, e-mail: php4beta-admin <email protected>