attached....
--- /home/john/working/php-src/Zend/zend_operators.c 2004-07-27 11:15:55.000000000 -0400 +++ /home/john/usbdrive/zend_operators.c 2004-07-26 02:01:54.000000000 -0400 @@ -1251,6 +1251,9 @@ zend_free_obj_get_result(op2, free_op2); \ return retval; +#define CHECK_SPECIAL(op1, op2) \ + (op1->type == IS_LONG && !op1->value.lval && op2->type == IS_STRING) + ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) { zval op1_copy, op2_copy; @@ -1265,7 +1268,6 @@ free_op2 = 1; } - if ((op1->type == IS_NULL && op2->type == IS_STRING) || (op2->type == IS_NULL && op1->type == IS_STRING)) { if (op1->type == IS_NULL) { @@ -1303,6 +1305,16 @@ } } + if (CHECK_SPECIAL(op1, op2)) { + result->type = IS_LONG; + result->value.lval = 1; + COMPARE_RETURN_AND_FREE(SUCCESS); + } else if (CHECK_SPECIAL(op2, op1)) { + result->type = IS_LONG; + result->value.lval = -1; + COMPARE_RETURN_AND_FREE(SUCCESS); + } + zendi_convert_scalar_to_number(op1, op1_copy, result); zendi_convert_scalar_to_number(op2, op2_copy, result);
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php