26#include <unicode/ustring.h>
29#define COLLATOR_CONVERT_RETURN_FAILED(retval) { \
30 Z_TRY_ADDREF_P(retval); \
35static void collator_convert_hash_item_from_utf8_to_utf16(
41 UChar* new_val =
NULL;
42 int32_t new_val_len = 0;
76static void collator_convert_hash_item_from_utf16_to_utf8(
123 collator_convert_hash_item_from_utf8_to_utf16(
125 if( U_FAILURE( *
status ) )
142 collator_convert_hash_item_from_utf16_to_utf8(
144 if( U_FAILURE( *
status ) ) {
168 php_error(
E_WARNING,
"Error converting utf16 to utf8 in collator_convert_zval_utf16_to_utf8()" );
180 int32_t ustr_len = 0;
191 "Error casting object to string in collator_convert_zstr_utf8_to_utf16()");
207 int32_t ustr_len = 0;
238 php_error(
E_WARNING,
"Error casting object to string in collator_convert_object_to_string()" );
241 zval_ptr_dtor_str( zstr );
354 zend_string_release(utf8_str);
zval * collator_normalize_sort_argument(zval *arg, zval *rv)
zend_string * collator_zval_to_string(zval *arg)
void collator_convert_hash_from_utf16_to_utf8(HashTable *hash, UErrorCode *status)
zval * collator_convert_string_to_number(zval *str, zval *rv)
zval * collator_convert_string_to_number_if_possible(zval *str, zval *rv)
zval * collator_convert_string_to_double(zval *str, zval *rv)
zend_string * collator_convert_zstr_utf8_to_utf16(zend_string *utf8_str)
void collator_convert_hash_from_utf8_to_utf16(HashTable *hash, UErrorCode *status)
#define COLLATOR_CONVERT_RETURN_FAILED(retval)
zval * collator_convert_zstr_utf16_to_utf8(zval *utf16_zval, zval *rv)
zval * collator_convert_object_to_string(zval *obj, zval *rv)
uint8_t collator_is_numeric(UChar *str, int32_t length, zend_long *lval, double *dval, bool allow_errors)
hash(string $algo, string $data, bool $binary=false, array $options=[])
void intl_convert_utf8_to_utf16(UChar **target, int32_t *target_len, const char *src, size_t src_len, UErrorCode *status)
zend_string * intl_convert_utf16_to_utf8(const UChar *src, int32_t src_len, UErrorCode *status)
#define ZVAL_STRINGL(z, s, l)
#define ZVAL_EMPTY_STRING(z)
ZEND_API zval *ZEND_FASTCALL zend_hash_index_update(HashTable *ht, zend_ulong h, zval *pData)
ZEND_API zval *ZEND_FASTCALL zend_hash_update(HashTable *ht, zend_string *key, zval *pData)
#define ZEND_HASH_FOREACH_KEY_VAL(ht, _h, _key, _val)
#define ZEND_HASH_FOREACH_END()
struct _zend_string zend_string
#define Z_STRVAL_P(zval_p)
struct _zend_array HashTable
#define Z_OBJ_HT_P(zval_p)
#define Z_STRLEN_P(zval_p)
#define ZVAL_NEW_STR(z, s)
#define ZVAL_DOUBLE(z, d)
ZEND_API void zval_ptr_dtor(zval *zval_ptr)