Lines Matching refs:len

116 int php_tag_find(char *tag, size_t len, const char *set);
298 zend_long start = 0, len = 0; in php_spn_common_handler() local
301 &s22, &start, &len) == FAILURE) { in php_spn_common_handler()
306 len = ZSTR_LEN(s11); in php_spn_common_handler()
320 if (len < 0) { in php_spn_common_handler()
321 len += (ZSTR_LEN(s11) - start); in php_spn_common_handler()
322 if (len < 0) { in php_spn_common_handler()
323 len = 0; in php_spn_common_handler()
327 if (len > (zend_long)ZSTR_LEN(s11) - start) { in php_spn_common_handler()
328 len = ZSTR_LEN(s11) - start; in php_spn_common_handler()
331 if(len == 0) { in php_spn_common_handler()
338 ZSTR_VAL(s11) + start + len /*str1_end*/, in php_spn_common_handler()
343 ZSTR_VAL(s11) + start + len /*str1_end*/, in php_spn_common_handler()
745 static inline int php_charmask(unsigned char *input, size_t len, char *mask) in php_charmask() argument
752 for (end = input+len; input < end; input++) { in php_charmask()
761 if (end-len >= input) { /* there was no 'left' char */ in php_charmask()
797 size_t len = ZSTR_LEN(str); in php_trim() local
806 for (i = 0; i < len; i++) { in php_trim()
813 len -= trimmed; in php_trim()
817 if (len > 0) { in php_trim()
818 i = len - 1; in php_trim()
821 len--; in php_trim()
832 for (i = 0; i < len; i++) { in php_trim()
839 len -= trimmed; in php_trim()
843 if (len > 0) { in php_trim()
844 i = len - 1; in php_trim()
847 len--; in php_trim()
857 for (i = 0; i < len; i++) { in php_trim()
865 len -= trimmed; in php_trim()
869 if (len > 0) { in php_trim()
870 i = len - 1; in php_trim()
874 len--; in php_trim()
883 if (ZSTR_LEN(str) == len) { in php_trim()
886 return zend_string_init(c, len, 0); in php_trim()
1196 size_t len = 0; in php_implode() local
1220 len++; in php_implode()
1224 len++; in php_implode()
1228 len += ZSTR_LEN(*strptr); in php_implode()
1232 str = zend_string_safe_alloc(numelems - 1, ZSTR_LEN(delim), len, 0); in php_implode()
1388 PHPAPI char *php_strtoupper(char *s, size_t len) in php_strtoupper() argument
1393 e = (unsigned char *)c+len; in php_strtoupper()
1451 PHPAPI char *php_strtolower(char *s, size_t len) in php_strtolower() argument
1456 e = c+len; in php_strtolower()
1514 PHPAPI zend_string *php_basename(const char *s, size_t len, char *suffix, size_t sufflen) argument
1522 cnt = len;
1585 len = cend - comp;
1587 ret = zend_string_init(comp, len, 0);
1609 PHPAPI size_t php_dirname(char *path, size_t len) argument
1611 return zend_dirname(path, len);
2388 zval *len = NULL; local
2397 if (zend_parse_parameters(ZEND_NUM_ARGS(), "zzz|z/", &str, &repl, &from, &len) == FAILURE) {
2412 if (Z_TYPE_P(len) != IS_ARRAY) {
2413 convert_to_long_ex(len);
2414 l = zval_get_long(len);
2425 (argc == 4 && Z_TYPE_P(from) != Z_TYPE_P(len))
2431 if (zend_hash_num_elements(Z_ARRVAL_P(from)) != zend_hash_num_elements(Z_ARRVAL_P(len))) {
2554 if (argc > 3 && Z_TYPE_P(len) == IS_ARRAY) {
2555 while (len_idx < Z_ARRVAL_P(len)->nNumUsed) {
2556 tmp_len = &Z_ARRVAL_P(len)->arData[len_idx].val;
2562 if (len_idx < Z_ARRVAL_P(len)->nNumUsed) {
2569 l = Z_LVAL_P(len);
2822 PHPAPI char *php_strtr(char *str, size_t len, char *str_from, char *str_to, size_t trlen) argument
2832 for (i = 0; i < len; i++) {
2846 for (i = 0; i < len; i++) {
2918 size_t len, pos, old_pos; local
2938 len = ZSTR_LEN(str_key);
2939 if (UNEXPECTED(len < 1)) {
2942 } else if (UNEXPECTED(len > slen)) {
2946 if (len > maxlen) {
2947 maxlen = len;
2949 if (len < minlen) {
2950 minlen = len;
2953 num_bitset[len / sizeof(zend_ulong)] |= Z_UL(1) << (len % sizeof(zend_ulong));
2965 len = ZSTR_LEN(key_used);
2966 if (UNEXPECTED(len > slen)) {
2970 if (len > maxlen) {
2971 maxlen = len;
2973 if (len < minlen) {
2974 minlen = len;
2977 num_bitset[len / sizeof(zend_ulong)] |= Z_UL(1) << (len % sizeof(zend_ulong));
2981 len = ZSTR_LEN(key_used);
2982 if (UNEXPECTED(len > slen)) {
3008 len = maxlen;
3009 if (len > slen - pos) {
3010 len = slen - pos;
3012 while (len >= minlen) {
3013 if ((num_bitset[len / sizeof(zend_ulong)] & (Z_UL(1) << (len % sizeof(zend_ulong))))) {
3014 entry = zend_hash_str_find(pats, key, len);
3019 old_pos = pos + len;
3025 len--;
4443 size_t len = strlen(retval); local
4450 if (len == ZSTR_LEN(loc) && !memcmp(ZSTR_VAL(loc), retval, len)) {
4454 BG(locale_string) = zend_string_init(retval, len, 0);
4458 } else if (len == ZSTR_LEN(loc) && !memcmp(ZSTR_VAL(loc), retval, len)) {
4525 int php_tag_find(char *tag, size_t len, const char *set) { argument
4530 if (len <= 0) {
4534 norm = emalloc(len+1);
4580 PHPAPI size_t php_strip_tags(char *rbuf, size_t len, int *stateptr, const char *allow, size_t allow… argument
4582 return php_strip_tags_ex(rbuf, len, stateptr, allow, allow_len, 0);
4606 PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, int *stateptr, const char *allow, size_t al… argument
4619 buf = estrndup(rbuf, len);
4634 while (i < len) {
4865 if (rp < rbuf + len) {
5078 int len, i; local
5096 len = (int)strlen(currlocdata.grouping);
5098 for (i = 0; i < len; i++) {
5103 len = (int)strlen(currlocdata.mon_grouping);
5105 for (i = 0; i < len; i++) {
5353 static void php_string_shuffle(char *str, zend_long len) /* {{{ */ argument
5359 n_elems = len;
5607 zend_long offset, len=0; local
5612 …if (zend_parse_parameters(ZEND_NUM_ARGS(), "SSl|l!b", &s1, &s2, &offset, &len, &len_is_default, &c…
5616 if (!len_is_default && len <= 0) {
5617 if (len == 0) {
5635 cmp_len = (size_t) (len ? len : MAX(ZSTR_LEN(s2), (ZSTR_LEN(s1) - offset)));