Back to index

php5  5.3.10
php_array.h
Go to the documentation of this file.
00001 /* 
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Andi Gutmans <andi@zend.com>                                |
00016    |          Zeev Suraski <zeev@zend.com>                                |
00017    |          Rasmus Lerdorf <rasmus@php.net>                             |
00018    |          Andrei Zmievski <andrei@php.net>                            |
00019    +----------------------------------------------------------------------+
00020 */
00021 
00022 /* $Id: php_array.h 321634 2012-01-01 13:15:04Z felipe $ */
00023 
00024 #ifndef PHP_ARRAY_H
00025 #define PHP_ARRAY_H
00026 
00027 PHP_MINIT_FUNCTION(array);
00028 PHP_MSHUTDOWN_FUNCTION(array);
00029 
00030 PHP_FUNCTION(ksort);
00031 PHP_FUNCTION(krsort);
00032 PHP_FUNCTION(natsort);
00033 PHP_FUNCTION(natcasesort);
00034 PHP_FUNCTION(asort);
00035 PHP_FUNCTION(arsort);
00036 PHP_FUNCTION(sort);
00037 PHP_FUNCTION(rsort);
00038 PHP_FUNCTION(usort);
00039 PHP_FUNCTION(uasort);
00040 PHP_FUNCTION(uksort);
00041 PHP_FUNCTION(array_walk);
00042 PHP_FUNCTION(array_walk_recursive);
00043 PHP_FUNCTION(count);
00044 PHP_FUNCTION(end);
00045 PHP_FUNCTION(prev);
00046 PHP_FUNCTION(next);
00047 PHP_FUNCTION(reset);
00048 PHP_FUNCTION(current);
00049 PHP_FUNCTION(key);
00050 PHP_FUNCTION(min);
00051 PHP_FUNCTION(max);
00052 PHP_FUNCTION(in_array);
00053 PHP_FUNCTION(array_search);
00054 PHP_FUNCTION(extract);
00055 PHP_FUNCTION(compact);
00056 PHP_FUNCTION(array_fill);
00057 PHP_FUNCTION(array_fill_keys);
00058 PHP_FUNCTION(range);
00059 PHP_FUNCTION(shuffle);
00060 PHP_FUNCTION(array_multisort);
00061 PHP_FUNCTION(array_push);
00062 PHP_FUNCTION(array_pop);
00063 PHP_FUNCTION(array_shift);
00064 PHP_FUNCTION(array_unshift);
00065 PHP_FUNCTION(array_splice);
00066 PHP_FUNCTION(array_slice);
00067 PHP_FUNCTION(array_merge);
00068 PHP_FUNCTION(array_merge_recursive);
00069 PHP_FUNCTION(array_replace);
00070 PHP_FUNCTION(array_replace_recursive);
00071 PHP_FUNCTION(array_keys);
00072 PHP_FUNCTION(array_values);
00073 PHP_FUNCTION(array_count_values);
00074 PHP_FUNCTION(array_reverse);
00075 PHP_FUNCTION(array_reduce);
00076 PHP_FUNCTION(array_pad);
00077 PHP_FUNCTION(array_flip);
00078 PHP_FUNCTION(array_change_key_case);
00079 PHP_FUNCTION(array_rand);
00080 PHP_FUNCTION(array_unique);
00081 PHP_FUNCTION(array_intersect);
00082 PHP_FUNCTION(array_intersect_key);
00083 PHP_FUNCTION(array_intersect_ukey);
00084 PHP_FUNCTION(array_uintersect);
00085 PHP_FUNCTION(array_intersect_assoc);
00086 PHP_FUNCTION(array_uintersect_assoc);
00087 PHP_FUNCTION(array_intersect_uassoc);
00088 PHP_FUNCTION(array_uintersect_uassoc);
00089 PHP_FUNCTION(array_diff);
00090 PHP_FUNCTION(array_diff_key);
00091 PHP_FUNCTION(array_diff_ukey);
00092 PHP_FUNCTION(array_udiff);
00093 PHP_FUNCTION(array_diff_assoc);
00094 PHP_FUNCTION(array_udiff_assoc);
00095 PHP_FUNCTION(array_diff_uassoc);
00096 PHP_FUNCTION(array_udiff_uassoc);
00097 PHP_FUNCTION(array_sum);
00098 PHP_FUNCTION(array_product);
00099 PHP_FUNCTION(array_filter);
00100 PHP_FUNCTION(array_map);
00101 PHP_FUNCTION(array_key_exists);
00102 PHP_FUNCTION(array_chunk);
00103 PHP_FUNCTION(array_combine);
00104 
00105 PHPAPI HashTable* php_splice(HashTable *, int, int, zval ***, int, HashTable **);
00106 PHPAPI int php_array_merge(HashTable *dest, HashTable *src, int recursive TSRMLS_DC);
00107 PHPAPI int php_array_replace_recursive(HashTable *dest, HashTable *src TSRMLS_DC);
00108 PHPAPI int php_multisort_compare(const void *a, const void *b TSRMLS_DC);
00109 
00110 #define PHP_SORT_REGULAR            0
00111 #define PHP_SORT_NUMERIC            1
00112 #define PHP_SORT_STRING             2
00113 #define PHP_SORT_DESC               3
00114 #define PHP_SORT_ASC                4
00115 #define PHP_SORT_LOCALE_STRING      5
00116 
00117 ZEND_BEGIN_MODULE_GLOBALS(array) 
00118        int *multisort_flags[2];
00119        int (*compare_func)(zval *result, zval *op1, zval *op2 TSRMLS_DC);
00120 ZEND_END_MODULE_GLOBALS(array) 
00121 
00122 #ifdef ZTS
00123 #define ARRAYG(v) TSRMG(array_globals_id, zend_array_globals *, v)
00124 #else
00125 #define ARRAYG(v) (array_globals.v)
00126 #endif
00127 
00128 #endif /* PHP_ARRAY_H */