Re: [PHP-DEV] Re: Fwd: ZEND_VERIFY_RESOURCE() question

2004-02-04 Thread Ilia Alshanetsky
On February 04, 2004 03:28 pm, Sterling Hughes wrote: > > So today you have places that require you to do: > > $ret = func_call(); > > if ($ret !== NULL && $ret !== false) > > or > > if ($ret) That's not always possible since the function could return 0 or "" and trigger an error conditi

Re: [PHP-DEV] Re: Fwd: ZEND_VERIFY_RESOURCE() question

2004-02-04 Thread Sterling Hughes
> Hello Andi, > > i brought the fact up nearly a year ago and i very much appreciate > the simple solution of changing the return value. Since the old way > is bork anyways i am all fine (+1). One of the most annoying problems is > that several function force you to test against NULL and FALSE. >

Re: [PHP-DEV] Re: Fwd: ZEND_VERIFY_RESOURCE() question

2004-02-04 Thread Marcus Boerger
Hello Andi, i brought the fact up nearly a year ago and i very much appreciate the simple solution of changing the return value. Since the old way is bork anyways i am all fine (+1). One of the most annoying problems is that several function force you to test against NULL and FALSE. NULL for all t

Re: [PHP-DEV] Re: Fwd: ZEND_VERIFY_RESOURCE() question

2004-02-04 Thread Sebastian Bergmann
Andi Gutmans wrote: > The real question is, do we change the default return_value to FALSE > and change ZEND_FETCH_RESOURCE() to return FALSE and try and > standardize for PHP 5 (and risk breaking people's scripts, mainly > people using === and !==) or do we stick to the status quo? +1 for consi

[PHP-DEV] Re: Fwd: ZEND_VERIFY_RESOURCE() question

2004-02-04 Thread Andi Gutmans
Hey guys, Ilia raises a valid point here. We are quite inconsistent today when it comes to return values. In ext, for example, most functions return FALSE and not NULL (roughly about 2910 vs. 47), however, by default (before the function is called) the return_value is set to the NULL value (so