上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: 1 PHP_FUNCTION(array_diff) 2 { 3 zval *args; 4 int argc, i; 5 uint32_t num; 6 HashTable exclude; 7 zval *value; 8 zend_string *str, *key; 9 zend_long idx; 10 ... 阅读全文
posted @ 2018-06-07 17:44 S3c0ldW4ng 阅读(531) 评论(0) 推荐(0)
摘要: 1 PHP_FUNCTION(array_count_values) 2 { 3 zval *input, /* Input array */ 4 *entry, /* An entry in the input array */ 5 *tmp; 6 HashTable *myht; ... 阅读全文
posted @ 2018-06-07 13:51 S3c0ldW4ng 阅读(1330) 评论(0) 推荐(0)
摘要: 1 PHP_FUNCTION(array_combine) 2 { 3 HashTable *values, *keys; 4 uint32_t pos_values = 0; 5 zval *entry_keys, *entry_values; 6 int num_keys, num_values; 7 8 // 创建一个数组,用一个数... 阅读全文
posted @ 2018-06-07 00:29 S3c0ldW4ng 阅读(801) 评论(0) 推荐(0)
摘要: 1 PHP_FUNCTION(array_column) 2 { 3 zval *zcolumn = NULL, *zkey = NULL, *data; 4 HashTable *arr_hash; 5 zval *zcolval = NULL, *zkeyval = NULL, rvc, rvk; 6 7 // !如果接收了一个php语言里的n... 阅读全文
posted @ 2018-06-07 00:08 S3c0ldW4ng 阅读(1600) 评论(0) 推荐(0)
摘要: 1 PHP_FUNCTION(array_chunk) 2 { 3 int argc = ZEND_NUM_ARGS(), num_in; 4 zend_long size, current = 0; 5 zend_string *str_key; 6 zend_ulong num_key; 7 zend_bool preserve_keys... 阅读全文
posted @ 2018-06-06 00:36 S3c0ldW4ng 阅读(761) 评论(0) 推荐(0)
摘要: 1 PHP_FUNCTION(array_change_key_case) 2 { 3 zval *array, *entry; 4 zend_string *string_key; 5 zend_string *new_key; 6 zend_ulong num_key; 7 zend_long change_to_upper=0; 8 ... 阅读全文
posted @ 2018-06-05 21:12 S3c0ldW4ng 阅读(266) 评论(0) 推荐(0)
摘要: 1、zend_hash_num_elements 获取数组元素个数。宏定义如下: 1 #define zend_hash_num_elements(ht) \ 2 (ht)->nNumOfElements 2、ZEND_HASH_FOREACH_KEY_VAL 遍历数组键值。使用方法: 1 ZEND 阅读全文
posted @ 2018-05-29 15:36 S3c0ldW4ng 阅读(587) 评论(0) 推荐(0)
摘要: 1 PHP_FUNCTION(array_sum) 2 { 3 zval *input, 4 *entry, 5 entry_n; 6 7 if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &input) == FAILURE) { 8 return; 9 ... 阅读全文
posted @ 2018-05-29 10:41 S3c0ldW4ng 阅读(874) 评论(0) 推荐(0)
摘要: 1 PHP_FUNCTION(strpos) 2 { 3 zval *needle; 4 zend_string *haystack; 5 char *found = NULL; 6 char needle_char[2]; 7 zend_long offset = 0; // 搜索位置默认0 8 9 ZEND_PARSE_... 阅读全文
posted @ 2018-05-27 22:10 S3c0ldW4ng 阅读(399) 评论(0) 推荐(0)
摘要: 1 PHP_FUNCTION(str_pad) 2 { 3 /* Input arguments */ 4 zend_string *input; /* Input string 输入字符串*/ 5 zend_long pad_length; /* Length to pad to 填充到多长.*/ 6 ... 阅读全文
posted @ 2018-05-27 00:58 S3c0ldW4ng 阅读(589) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页