mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
- Zend engine part for bug #55158: Add SORT_NATURAL type to array_multisort
(patch by Arpad Ray).
This commit is contained in:
parent
b52256c5be
commit
56a87c2806
@ -1288,7 +1288,7 @@ ZEND_API int concat_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
|
||||
ZEND_API int string_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
zval op1_copy, op2_copy;
|
||||
int use_copy1 = 0, use_copy2 = 0;
|
||||
@ -1307,7 +1307,11 @@ ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_D
|
||||
op2 = &op2_copy;
|
||||
}
|
||||
|
||||
ZVAL_LONG(result, zend_binary_zval_strcmp(op1, op2));
|
||||
if (case_insensitive) {
|
||||
ZVAL_LONG(result, zend_binary_zval_strcasecmp(op1, op2));
|
||||
} else {
|
||||
ZVAL_LONG(result, zend_binary_zval_strcmp(op1, op2));
|
||||
}
|
||||
|
||||
if (use_copy1) {
|
||||
zval_dtor(op1);
|
||||
@ -1319,6 +1323,18 @@ ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_D
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return string_compare_function_ex(result, op1, op2, 0);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
ZEND_API int string_case_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
return string_compare_function_ex(result, op1, op2, 1);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if HAVE_STRCOLL
|
||||
ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC) /* {{{ */
|
||||
{
|
||||
|
@ -301,7 +301,9 @@ ZEND_API double zend_string_to_double(const char *number, zend_uint length);
|
||||
ZEND_API int zval_is_true(zval *op);
|
||||
ZEND_API int compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
|
||||
ZEND_API int numeric_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
|
||||
ZEND_API int string_compare_function_ex(zval *result, zval *op1, zval *op2, zend_bool case_insensitive TSRMLS_DC);
|
||||
ZEND_API int string_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
|
||||
ZEND_API int string_case_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
|
||||
#if HAVE_STRCOLL
|
||||
ZEND_API int string_locale_compare_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user