php_array.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Authors: Andi Gutmans <andi@php.net> |
  14. | Zeev Suraski <zeev@php.net> |
  15. | Rasmus Lerdorf <rasmus@php.net> |
  16. | Andrei Zmievski <andrei@php.net> |
  17. +----------------------------------------------------------------------+
  18. */
  19. #ifndef PHP_ARRAY_H
  20. #define PHP_ARRAY_H
  21. PHP_MINIT_FUNCTION(array);
  22. PHP_MSHUTDOWN_FUNCTION(array);
  23. PHPAPI int php_array_merge(HashTable *dest, HashTable *src);
  24. PHPAPI int php_array_merge_recursive(HashTable *dest, HashTable *src);
  25. PHPAPI int php_array_replace_recursive(HashTable *dest, HashTable *src);
  26. PHPAPI int php_multisort_compare(const void *a, const void *b);
  27. PHPAPI zend_long php_count_recursive(HashTable *ht);
  28. #define PHP_SORT_REGULAR 0
  29. #define PHP_SORT_NUMERIC 1
  30. #define PHP_SORT_STRING 2
  31. #define PHP_SORT_DESC 3
  32. #define PHP_SORT_ASC 4
  33. #define PHP_SORT_LOCALE_STRING 5
  34. #define PHP_SORT_NATURAL 6
  35. #define PHP_SORT_FLAG_CASE 8
  36. #define COUNT_NORMAL 0
  37. #define COUNT_RECURSIVE 1
  38. #define ARRAY_FILTER_USE_BOTH 1
  39. #define ARRAY_FILTER_USE_KEY 2
  40. ZEND_BEGIN_MODULE_GLOBALS(array)
  41. bucket_compare_func_t *multisort_func;
  42. bool compare_deprecation_thrown;
  43. ZEND_END_MODULE_GLOBALS(array)
  44. #define ARRAYG(v) ZEND_MODULE_GLOBALS_ACCESSOR(array, v)
  45. #endif /* PHP_ARRAY_H */