}
/* }}} */
-#if HAVE_STRCOLL
ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2) /* {{{ */
{
zend_string *tmp_str1, *tmp_str2;
return ret;
}
/* }}} */
-#endif
ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /* {{{ */
{
ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensitive);
ZEND_API int ZEND_FASTCALL string_compare_function(zval *op1, zval *op2);
ZEND_API int ZEND_FASTCALL string_case_compare_function(zval *op1, zval *op2);
-#if HAVE_STRCOLL
ZEND_API int ZEND_FASTCALL string_locale_compare_function(zval *op1, zval *op2);
-#endif
ZEND_API void ZEND_FASTCALL zend_str_tolower(char *str, size_t length);
ZEND_API char* ZEND_FASTCALL zend_str_tolower_copy(char *dest, const char *source, size_t length);
statvfs \
std_syslog \
strcasecmp \
-strcoll \
strdup \
strerror \
strnlen \
F1("str_split", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_ARRAY | MAY_BE_ARRAY_KEY_LONG | MAY_BE_ARRAY_OF_STRING),
F1("strpbrk", MAY_BE_FALSE | MAY_BE_STRING),
F0("substr_compare", MAY_BE_FALSE | MAY_BE_LONG),
-#ifdef HAVE_STRCOLL
F0("strcoll", MAY_BE_NULL | MAY_BE_LONG),
-#endif
#ifdef HAVE_STRFMON
F1("money_format", MAY_BE_NULL | MAY_BE_FALSE | MAY_BE_STRING),
#endif
}
/* }}} */
-#if HAVE_STRCOLL
static int php_array_key_compare_string_locale(const void *a, const void *b) /* {{{ */
{
Bucket *f = (Bucket *) a;
return php_array_key_compare_string_locale(b, a);
}
/* }}} */
-#endif
/* Numbers are always smaller than strings int this function as it
* anyway doesn't make much sense to compare two different data types.
}
/* }}} */
-#if HAVE_STRCOLL
static int php_array_data_compare_string_locale(const void *a, const void *b) /* {{{ */
{
Bucket *f;
return php_array_data_compare_string_locale(b, a);
}
/* }}} */
-#endif
static compare_func_t php_get_key_compare_func(zend_long sort_type, int reverse) /* {{{ */
{
}
break;
-#if HAVE_STRCOLL
case PHP_SORT_LOCALE_STRING:
if (reverse) {
return php_array_reverse_key_compare_string_locale;
return php_array_key_compare_string_locale;
}
break;
-#endif
case PHP_SORT_REGULAR:
default:
}
break;
-#if HAVE_STRCOLL
case PHP_SORT_LOCALE_STRING:
if (reverse) {
return php_array_reverse_data_compare_string_locale;
return php_array_data_compare_string_locale;
}
break;
-#endif
case PHP_SORT_REGULAR:
default:
case PHP_SORT_NUMERIC:
case PHP_SORT_STRING:
case PHP_SORT_NATURAL:
-#if HAVE_STRCOLL
case PHP_SORT_LOCALE_STRING:
-#endif
/* flag allowed here */
if (parse_state[MULTISORT_TYPE] == 1) {
/* Save the flag and make sure then next arg is not the current flag. */
ZEND_END_ARG_INFO()
#endif
-#ifdef HAVE_STRCOLL
ZEND_BEGIN_ARG_INFO(arginfo_strcoll, 0)
ZEND_ARG_INFO(0, str1)
ZEND_ARG_INFO(0, str2)
ZEND_END_ARG_INFO()
-#endif
ZEND_BEGIN_ARG_INFO_EX(arginfo_trim, 0, 0, 1)
ZEND_ARG_INFO(0, str)
PHP_FE(substr_compare, arginfo_substr_compare)
PHP_FE(utf8_encode, arginfo_utf8_encode)
PHP_FE(utf8_decode, arginfo_utf8_decode)
-
-#ifdef HAVE_STRCOLL
PHP_FE(strcoll, arginfo_strcoll)
-#endif
#ifdef HAVE_STRFMON
PHP_FE(money_format, arginfo_money_format)
#else
tsrm_env_lock();
-
+
/* system method returns a const */
ptr = getenv(str);
-
+
if (ptr) {
RETVAL_STRING(ptr);
}
PHP_FUNCTION(substr_compare);
PHP_FUNCTION(utf8_encode);
PHP_FUNCTION(utf8_decode);
-#ifdef HAVE_STRCOLL
PHP_FUNCTION(strcoll);
-#endif
#if HAVE_STRFMON
PHP_FUNCTION(money_format);
#endif
#endif
/* }}} */
-#ifdef HAVE_STRCOLL
/* {{{ proto int strcoll(string str1, string str2)
Compares two strings using the current locale */
PHP_FUNCTION(strcoll)
(const char *) ZSTR_VAL(s2)));
}
/* }}} */
-#endif
/* {{{ php_charmask
* Fills a 256-byte bytemask with input. You can specify a range like 'a..z',
--TEST--
Testing Basic behaviour of strcoll()
---SKIPIF--
-<?php if (!function_exists('strcoll')) die('skip strcoll function not available') ?>
--CREDITS--
Sebastian Schürmann
sebs@php.net
ADD_FLAG("CFLAGS", "/D FD_SETSIZE=" + parseInt(PHP_FD_SETSIZE));
AC_DEFINE('HAVE_USLEEP', 1);
-AC_DEFINE('HAVE_STRCOLL', 1);
/* For snapshot builders, where can we find the additional
* files that make up the snapshot template? */
#define PHP_SHLIB_EXT_PREFIX "php_"
#define HAVE_SQLDATASOURCES
-/* Win32 supports strcoll */
-#define HAVE_STRCOLL 1
-
/* Win32 supports socketpair by the emulation in win32/sockets.c */
#define HAVE_SOCKETPAIR 1
#define HAVE_SOCKLEN_T 1