On 16.03.2009, at 16:49, Pierre Joye wrote:
2009/3/16 Johannes Schlüter johan...@php.net:
Hi,
On Mon, 2009-03-16 at 09:52 +, Dmitry Stogov wrote:
Log:
Fixed bug #47664 (get_class returns NULL instead of FALSE)
[...]
@@ -716,7 +716,7 @@
int dup;
if
2009/3/16 Johannes Schlüter johan...@php.net:
Hi,
On Mon, 2009-03-16 at 09:52 +, Dmitry Stogov wrote:
Log:
Fixed bug #47664 (get_class returns NULL instead of FALSE)
[...]
@@ -716,7 +716,7 @@
int dup;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |o,
obj) ==
2009/3/16 Stanislav Malyshev s...@zend.com:
Hi!
Log:
Fixed bug #47664 (get_class returns NULL instead of FALSE)
[...]
@@ -716,7 +716,7 @@
int dup;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |o,
obj) == FAILURE) {
- return;
+
Hi!
If all other functions return NULL with wrong args, why should get_class
return false? Is there any value in it besides the fact that docs say so?
The main reason is the documentation. It introduces a useless BC break
which was reported in #47664.
Well, sometimes a bug is a bug and we
On Mon, Mar 16, 2009 at 6:43 PM, Stanislav Malyshev s...@zend.com wrote:
Hi!
If all other functions return NULL with wrong args, why should get_class
return false? Is there any value in it besides the fact that docs say so?
The main reason is the documentation. It introduces a useless BC
Hi!
The new parsing API and the strictness of this return NULL rule is
new and arguable. As it is not that important (work 'round is easy), I
tend to prefer to minimize the wtf instead of being too strict.
Minimizing the WTF may also mean standardizing exception handling - i.e.
knowing what
On Mon, Mar 16, 2009 at 6:49 PM, Stanislav Malyshev s...@zend.com wrote:
Hi!
The new parsing API and the strictness of this return NULL rule is
new and arguable. As it is not that important (work 'round is easy), I
tend to prefer to minimize the wtf instead of being too strict.
Minimizing
Hi!
Why do functions return NULL? (I know the technical answer, obviously,
I'm interested in the design decision). If FALSE is the error
condition, whats the point in a separate NULL error condition?
Because false is not an error condition. It's a legitimate value, which
can be normal answer
On Mon, Mar 16, 2009 at 6:46 PM, Stanislav Malyshev s...@zend.com wrote:
Hi!
Why do functions return NULL? (I know the technical answer, obviously,
I'm interested in the design decision). If FALSE is the error
condition, whats the point in a separate NULL error condition?
Because false is
Hi!
Is this not the case for NULL?
Null means no value, which is relatively rarely legitimate return of
the function (most of the functions legitimately returning null AFAIK
are value-manipulating functions i.e. they can return any type of value).
--
Stanislav Malyshev, Zend Software
10 matches
Mail list logo