You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.4 KiB

24 years ago
24 years ago
24 years ago
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 4 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2002 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 2.02 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available at through the world-wide-web at |
  10. | http://www.php.net/license/2_02.txt. |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Andi Gutmans <andi@zend.com> |
  16. | Zeev Suraski <zeev@zend.com> |
  17. | Rasmus Lerdorf <rasmus@php.net> |
  18. | Andrei Zmievski <andrei@php.net> |
  19. +----------------------------------------------------------------------+
  20. */
  21. /* $Id$ */
  22. #ifndef PHP_ARRAY_H
  23. #define PHP_ARRAY_H
  24. PHP_MINIT_FUNCTION(array);
  25. PHP_MSHUTDOWN_FUNCTION(array);
  26. PHP_FUNCTION(ksort);
  27. PHP_FUNCTION(krsort);
  28. PHP_FUNCTION(natsort);
  29. PHP_FUNCTION(natcasesort);
  30. PHP_FUNCTION(asort);
  31. PHP_FUNCTION(arsort);
  32. PHP_FUNCTION(sort);
  33. PHP_FUNCTION(rsort);
  34. PHP_FUNCTION(usort);
  35. PHP_FUNCTION(uasort);
  36. PHP_FUNCTION(uksort);
  37. PHP_FUNCTION(array_walk);
  38. PHP_FUNCTION(count);
  39. PHP_FUNCTION(end);
  40. PHP_FUNCTION(prev);
  41. PHP_FUNCTION(next);
  42. PHP_FUNCTION(reset);
  43. PHP_FUNCTION(current);
  44. PHP_FUNCTION(key);
  45. PHP_FUNCTION(min);
  46. PHP_FUNCTION(max);
  47. PHP_FUNCTION(in_array);
  48. PHP_FUNCTION(array_search);
  49. PHP_FUNCTION(extract);
  50. PHP_FUNCTION(compact);
  51. PHP_FUNCTION(array_fill);
  52. PHP_FUNCTION(range);
  53. PHP_FUNCTION(shuffle);
  54. PHP_FUNCTION(array_multisort);
  55. PHP_FUNCTION(array_push);
  56. PHP_FUNCTION(array_pop);
  57. PHP_FUNCTION(array_shift);
  58. PHP_FUNCTION(array_unshift);
  59. PHP_FUNCTION(array_splice);
  60. PHP_FUNCTION(array_slice);
  61. PHP_FUNCTION(array_merge);
  62. PHP_FUNCTION(array_merge_recursive);
  63. PHP_FUNCTION(array_keys);
  64. PHP_FUNCTION(array_values);
  65. PHP_FUNCTION(array_count_values);
  66. PHP_FUNCTION(array_reverse);
  67. PHP_FUNCTION(array_reduce);
  68. PHP_FUNCTION(array_pad);
  69. PHP_FUNCTION(array_flip);
  70. PHP_FUNCTION(array_change_key_case);
  71. PHP_FUNCTION(array_rand);
  72. PHP_FUNCTION(array_unique);
  73. PHP_FUNCTION(array_intersect);
  74. PHP_FUNCTION(array_intersect_assoc);
  75. PHP_FUNCTION(array_diff);
  76. PHP_FUNCTION(array_diff_assoc);
  77. PHP_FUNCTION(array_sum);
  78. PHP_FUNCTION(array_filter);
  79. PHP_FUNCTION(array_map);
  80. PHP_FUNCTION(array_key_exists);
  81. PHP_FUNCTION(array_chunk);
  82. HashTable* php_splice(HashTable *, int, int, zval ***, int, HashTable **);
  83. PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS_DC);
  84. int multisort_compare(const void *a, const void *b TSRMLS_DC);
  85. typedef struct {
  86. int *multisort_flags[2];
  87. int (*compare_func)(zval *result, zval *op1, zval *op2 TSRMLS_DC);
  88. } php_array_globals;
  89. #ifdef ZTS
  90. #define ARRAYG(v) TSRMG(array_globals_id, php_array_globals *, v)
  91. extern int array_globals_id;
  92. #else
  93. #define ARRAYG(v) (array_globals.v)
  94. extern php_array_globals array_globals;
  95. #endif
  96. #endif /* PHP_ARRAY_H */