[PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variation_

2009-03-16 Thread Dmitry Stogov
Hi Johannes, Johannes Schlüter wrote: 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) == FAIL

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Stanislav Malyshev
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 Arch

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Paul Biggar
On Mon, Mar 16, 2009 at 6:46 PM, Stanislav Malyshev 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 not a

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Stanislav Malyshev
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

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Paul Biggar
2009/3/16 Johannes Schlüter : > On Mon, 2009-03-16 at 18:41 +0100, Pierre Joye wrote: >> >> Usually we return NULL in case parameter parsing fails, this is >> >> documented like this: > The documentation is just like with other functions returning NULL for > param parsing and false for other error

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Johannes Schlüter
On Mon, 2009-03-16 at 18:41 +0100, Pierre Joye wrote: > >> Usually we return NULL in case parameter parsing fails, this is > >> documented like this: > > > > 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 doc

[PHP-DEV] [PATCH] Extend bitwise and modulus operators on 32-bit platforms

2009-03-16 Thread Matt Wilmas
Hi all, I changed the bitwise and modulus operator functions to [try to] make them more consistent with behavior on 64-bit platforms. By accepting double operands and, if necessary, returning a double, their usable range is greatly extended without running into overflow issues, etc. (Of cour

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Pierre Joye
On Mon, Mar 16, 2009 at 6:49 PM, Stanislav Malyshev 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 the

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Stanislav Malyshev
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

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Pierre Joye
On Mon, Mar 16, 2009 at 6:43 PM, Stanislav Malyshev 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 break

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Stanislav Malyshev
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 ca

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Pierre Joye
2009/3/16 Stanislav Malyshev : > 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; >>>

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variat

2009-03-16 Thread Stanislav Malyshev
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; + RETURN_FALSE; } Usually we return NULL in

Re: [PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variati

2009-03-16 Thread Pierre Joye
2009/3/16 Johannes Schlüter : > 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", >> &o

[PHP-DEV] Re: cvs: ZendEngine2 / zend_builtin_functions.c /tests 009.phpt php-src/ext/reflection/tests 027.phpt php-src/ext/standard/tests/class_object get_class_error_001.phpt get_class_variation_

2009-03-16 Thread Johannes Schlüter
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) == FAILURE) { > - return

[PHP-DEV] Re: [PATCH] Remove nTableSize from HashTable?

2009-03-16 Thread Dmitry Stogov
Hi Matt, I don't see a lot of reason in this patch as the benefit is near invisible and readability becomes worse. Also the patch can break third-party modules like APC and Zend extensions. Even it's not a big problem as they can be easily fixed, I'm against of changing of core components wi

[PHP-DEV] PHP 6 Bug Summary Report

2009-03-16 Thread internals
PHP 6 Bug Database summary - http://bugs.php.net/ Num Status Summary (75 total -- which includes 32 feature requests) ===[*General Issues]== 26771 Suspended register_tick_funtions crash under threaded webservers ===

[PHP-DEV] PHP 5 Bug Summary Report

2009-03-16 Thread internals
PHP 5 Bug Database summary - http://bugs.php.net/ Num Status Summary (1335 total -- which includes 820 feature requests) ===[*Directory/Filesystem functions] 46990 Assigned Passing UTF8 strings to filesystem functions produce wrong filenames ===