Re: [PHP4BETA] Re: min/max oddities
| From: | Andi Gutmans | Date: | Mon, 08 Nov 1999 20:26:30 +0000 |
| Subject: | Re: [PHP4BETA] Re: min/max oddities | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-5971@lists.php.net to get a copy of this message | ||
At 08:29 AM 11/8/99 -0600, Andrei Zmievski wrote:
On Sun, 07 Nov 1999, Thies C . Arntzen wrote: hi andi, i've enclosed a patch that makes min()/max() use compare_function() from libzend - i'm too tired to commit something like this without at least two more eyes on it. maybe you could check & apply it?convert_to_long() is necessary because in the end Thies checks value.lval. If the result of the compare_function was not a long we need to make sure it is converted. Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/+ if (compare_function(&result, first, second) == FAILURE) { + return 0; + }++ convert_to_long(&result);I don't think convert_to_long() is necessary, since compare_function() sets the type of the result.