/PHP-8.0/ext/standard/tests/strings/ |
H A D | bug54055.phpt | 11 495: len=502 12 496: len=503 13 497: len=504 14 498: len=505 15 499: len=506 16 500: len=507 17 501: len=507 18 502: len=507 19 503: len=507 20 504: len=507 [all …]
|
H A D | substr_replace.phpt | 15 $len = 3; 20 $len = 0; 25 $len = -2; 36 $len = 3; 81 $len = 3; 92 $len = 3; 102 $len = 3; 111 $len = 0; 121 $len = 0; 155 $len = 3; [all …]
|
/PHP-8.0/tests/output/ |
H A D | ob_start_basic_004.phpt | 15 return "f[call:$callback_invocations; len:$len]$string\n"; 43 f[call:1; len:1]1 44 f[call:2; len:1]2 45 f[call:3; len:1]3 46 f[call:4; len:1]4 47 f[call:5; len:1]5 48 f[call:6; len:1]6 51 f[call:9; len:0] 58 f[call:5; len:0] 68 f[call:3; len:0] [all …]
|
/PHP-8.0/Zend/ |
H A D | zend_smart_str.c | 63 size_t i, len = l; in zend_compute_escaped_string_len() local 68 len += 1; in zend_compute_escaped_string_len() 70 len += 3; in zend_compute_escaped_string_len() 73 return len; in zend_compute_escaped_string_len() 82 ZSTR_LEN(str->s) += len; in smart_str_append_escaped() 130 str->len = 0; in _smart_string_alloc_persistent() 138 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc_persistent() 141 len += str->len; in _smart_string_alloc_persistent() 150 str->len = 0; in _smart_string_alloc() 164 if (UNEXPECTED((size_t) len > SIZE_MAX - str->len)) { in _smart_string_alloc() [all …]
|
H A D | zend_smart_string.h | 55 if (UNEXPECTED(!str->c) || UNEXPECTED(len >= str->a - str->len)) { in smart_string_alloc() 59 _smart_string_alloc(str, len); in smart_string_alloc() 62 return str->len + len; in smart_string_alloc() 70 str->a = str->len = 0; in smart_string_free_ex() 75 str->c[str->len] = '\0'; in smart_string_0() 81 dest->c[dest->len - 1] = ch; in smart_string_appendc_ex() 86 memcpy(dest->c + dest->len, str, len); in smart_string_appendl_ex() 87 dest->len = new_len; in smart_string_appendl_ex() 104 dest->len = len; in smart_string_setl() 105 dest->a = len + 1; in smart_string_setl() [all …]
|
H A D | zend_vm_trace_handlers.h | 32 size_t len; in zend_vm_trace() local 36 len = last_len + 1 + op_len; in zend_vm_trace() 90 size_t len; in zend_vm_trace_init() local 95 len = strlen(buf); in zend_vm_trace_init() 96 while (len > 0 && buf[len-1] <= ' ') { in zend_vm_trace_init() 97 len--; in zend_vm_trace_init() 98 buf[len] = 0; in zend_vm_trace_init() 100 while (len > 0 && buf[len-1] >= '0' && buf[len-1] <= '9') { in zend_vm_trace_init() 101 len--; in zend_vm_trace_init() 103 if (len > 1) { in zend_vm_trace_init() [all …]
|
H A D | zend_bitset.h | 148 for (i = 0; i < len; i++) { 175 for (i = 0; i < len; i++) { 184 for (i = 0; i < len; i++) { 193 for (i = 0; i < len; i++) { 202 for (i = 0; i < len; i++) { 211 for (i = 0; i < len; i++) { 220 for (i = 0; i < len; i++) { 232 for (i = 0; i < len; i++) { 242 uint32_t i = len; 261 uint32_t _i, _len = (len); \ [all …]
|
H A D | zend_string.h | 84 #define _ZSTR_STRUCT_SIZE(len) (_ZSTR_HEADER_SIZE + len + 1) in END_EXTERN_C() argument 149 ZSTR_LEN(ret) = len; in zend_string_alloc() 175 if (len > 1) { in zend_string_init_fast() 177 } else if (len == 0) { in zend_string_init_fast() 405 for (; len >= 8; len -= 8, str += 8) { in zend_inline_hash_func() 439 if (len >= 4) { in zend_inline_hash_func() 446 len -= 4; in zend_inline_hash_func() 449 if (len >= 2) { in zend_inline_hash_func() 450 if (len > 2) { in zend_inline_hash_func() 467 for (; len >= 8; len -= 8) { in zend_inline_hash_func() [all …]
|
H A D | zend_smart_str.h | 28 #define smart_str_extend(dest, len) \ argument 29 smart_str_extend_ex((dest), (len), 0) 32 #define smart_str_appendl(dest, src, len) \ argument 33 smart_str_appendl_ex((dest), (src), (len), 0) 61 len += ZSTR_LEN(str->s); in END_EXTERN_C() 62 if (UNEXPECTED(len >= str->a)) { in END_EXTERN_C() 65 smart_str_realloc(str, len); in END_EXTERN_C() 67 smart_str_erealloc(str, len); in END_EXTERN_C() 71 return len; in END_EXTERN_C() 75 size_t new_len = smart_str_alloc(dest, len, persistent); in smart_str_extend_ex() [all …]
|
/PHP-8.0/sapi/fpm/fpm/ |
H A D | zlog.c | 79 size_t len; in zlog_print_time() local 84 len += snprintf(timebuf + len, timebuf_len - len, ".%06d", (int) tv->tv_usec); in zlog_print_time() 86 len += snprintf(timebuf + len, timebuf_len - len, "] "); in zlog_print_time() 87 return len; in zlog_print_time() 177 len += snprintf(buf + len, buf_size - len, "%s: pid %d, %s(), line %d: ", in zlog_buf_prefix() 180 len += snprintf(buf + len, buf_size - len, "%s: %s(), line %d: ", in zlog_buf_prefix() 184 len += snprintf(buf + len, buf_size - len, "%s: ", in zlog_buf_prefix() 215 len += vsnprintf(buf + len, buf_size - len, fmt, args); in vzlog() 223 len += snprintf(buf + len, buf_size - len, in vzlog() 399 len = zlog_limit - stream->len - append_len; in zlog_stream_unbuffered_write() [all …]
|
H A D | fpm_log.c | 103 size_t len, len2; in fpm_log_write() local 145 len = 0; in fpm_log_write() 152 if (len >= FPM_LOG_BUFFER) { in fpm_log_write() 154 len = FPM_LOG_BUFFER; in fpm_log_write() 395 len2 = snprintf(b, FPM_LOG_BUFFER - len, "%s", tmp); in fpm_log_write() 447 len += len2; in fpm_log_write() 449 if (len >= FPM_LOG_BUFFER) { in fpm_log_write() 451 len = FPM_LOG_BUFFER; in fpm_log_write() 461 len++; in fpm_log_write() 467 buffer[len] = '\n'; in fpm_log_write() [all …]
|
/PHP-8.0/ext/opcache/Optimizer/ |
H A D | zend_worklist.h | 27 int len; member 33 (s)->len = 0; \ 42 ZEND_ASSERT(len >= 0); in zend_worklist_stack_prepare() 45 stack->len = 0; in zend_worklist_stack_prepare() 46 stack->capacity = len; in zend_worklist_stack_prepare() 54 stack->buf[stack->len++] = i; in zend_worklist_stack_push() 59 ZEND_ASSERT(stack->len); in zend_worklist_stack_peek() 65 ZEND_ASSERT(stack->len); in zend_worklist_stack_pop() 76 (w)->stack.len = 0; \ 87 ZEND_ASSERT(len >= 0); in zend_worklist_prepare() [all …]
|
/PHP-8.0/ext/filter/ |
H A D | filter_private.h | 107 #define PHP_FILTER_TRIM_DEFAULT(p, len) PHP_FILTER_TRIM_DEFAULT_EX(p, len, 1); argument 109 #define PHP_FILTER_TRIM_DEFAULT_EX(p, len, return_if_empty) { \ argument 110 while ((len > 0) && (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\v' || *p == '\n')) { \ 112 len--; \ 114 if (len < 1 && return_if_empty) { \ 117 if (len > 0) { \ 118 …while (p[len-1] == ' ' || p[len-1] == '\t' || p[len-1] == '\r' || p[len-1] == '\v' || p[len-1] == … 119 len--; \
|
/PHP-8.0/ext/dba/libcdb/ |
H A D | cdb.c | 49 while (len > 0) { in cdb_match() 51 if (n > len) in cdb_match() 52 n = len; in cdb_match() 59 len -= n; in cdb_match() 72 while (len--) { in cdb_hash() 108 while (len > 0) { in cdb_read() 120 len -= r; in cdb_read() 134 u = cdb_hash(key, len); in cdb_findnext() 163 if (u == len) in cdb_findnext() 169 c->dpos = pos + 8 + len; in cdb_findnext() [all …]
|
/PHP-8.0/ext/standard/ |
H A D | uuencode.c | 66 size_t len = 45; in php_uuencode() local 80 ee = s + len; in php_uuencode() 83 len = ee - s; in php_uuencode() 84 if (len % 3) { in php_uuencode() 99 if (len == 45) { in php_uuencode() 107 len = 0; in php_uuencode() 116 if (len < 45) { in php_uuencode() 156 ee = s + (len == 45 ? 60 : (int) floor(len * 1.33)); in php_uudecode() 172 if (len < 45) { in php_uudecode() 183 if (len > 1) { in php_uudecode() [all …]
|
H A D | php_string.h | 38 PHPAPI char *php_strtoupper(char *s, size_t len); 39 PHPAPI char *php_strtolower(char *s, size_t len); 42 PHPAPI char *php_strtr(char *str, size_t len, const char *str_from, const char *str_to, size_t trle… 45 PHPAPI zend_string *php_addcslashes_str(const char *str, size_t len, const char *what, size_t what_… 48 PHPAPI zend_string *php_basename(const char *s, size_t len, const char *suffix, size_t sufflen); 49 PHPAPI size_t php_dirname(char *str, size_t len); 54 PHPAPI size_t php_strip_tags(char *rbuf, size_t len, const char *allow, size_t allow_len); 55 PHPAPI size_t php_strip_tags_ex(char *rbuf, size_t len, const char *allow, size_t allow_len, zend_b… 70 # define php_mblen(ptr, len) ((int) mbrlen(ptr, len, &BG(mblen_state))) argument 73 # define php_mblen(ptr, len) mblen(ptr, len) argument
|
/PHP-8.0/ext/filter/tests/ |
H A D | 048.phpt | 8 $len = strlen($s); 9 while ($len > 0) { 10 $len--; 11 if ($s[$len] != 'f') { 12 if ($s[$len] == '9') { 13 $s[$len] = 'a'; 15 $s[$len] = $s[$len] + 1; 19 $s[$len] = '0';
|
H A D | 047.phpt | 8 $len = strlen($s); 9 while ($len > 0) { 10 $len--; 11 if ($s[$len] != '7') { 12 $s[$len] = $s[$len] + 1; 15 $s[$len] = '0';
|
/PHP-8.0/sapi/phpdbg/ |
H A D | phpdbg_io.c | 64 for (i = len; i < len + bytes; i++) { in ZEND_EXTERN_MODULE_GLOBALS() 66 if (i != len + bytes - 1) { in ZEND_EXTERN_MODULE_GLOBALS() 69 len--; in ZEND_EXTERN_MODULE_GLOBALS() 85 len += bytes; in ZEND_EXTERN_MODULE_GLOBALS() 86 …} while ((bytes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, buf + len, PHPDBG_MAX_CMD - len… in ZEND_EXTERN_MODULE_GLOBALS() 97 int got_now, i = len, j; 161 int sent, i = len; 173 return len; 185 ret = read(sock, ptr, len); 216 bytes += write(sock, ptr, len); [all …]
|
/PHP-8.0/ext/fileinfo/libmagic/ |
H A D | der.c | 187 size_t len; in getlength() local 214 len = 0; in getlength() 216 len = (len << 8) | c[(*p)++]; in getlength() 218 if (len > UINT32_MAX - *p || *p + len > l) { in getlength() 220 __func__, *p, len, l)); in getlength() 223 return CAST(uint32_t, len); in getlength() 247 if (len < 12) in der_data() 262 return len * 2; in der_data() 420 if (p + len > ep) in printdata() 422 printtag(tag, q, len); in printdata() [all …]
|
/PHP-8.0/main/ |
H A D | php_open_temporary_file.c | 215 size_t len = strlen(sys_temp_dir); in php_get_temporary_directory() local 216 if (len >= 2 && sys_temp_dir[len - 1] == DEFAULT_SLASH) { in php_get_temporary_directory() 219 } else if (len >= 1 && sys_temp_dir[len - 1] != DEFAULT_SLASH) { in php_get_temporary_directory() 235 size_t len = GetTempPathW(MAXPATHLEN, sTemp); in php_get_temporary_directory() local 237 if (!len) { in php_get_temporary_directory() 241 if (NULL == (tmp = php_win32_ioutil_conv_w_to_any(sTemp, len, &len))) { in php_get_temporary_directory() 245 PG(php_sys_temp_dir) = estrndup(tmp, len - 1); in php_get_temporary_directory() 255 size_t len = strlen(s); in php_get_temporary_directory() local 257 if (s[len - 1] == DEFAULT_SLASH) { in php_get_temporary_directory() 258 PG(php_sys_temp_dir) = estrndup(s, len - 1); in php_get_temporary_directory() [all …]
|
/PHP-8.0/ext/dba/ |
H A D | dba_cdb.c | 136 # define php_cdb_read(cdb, buf, len, pos) cdb_read(cdb, buf, len, pos) argument 137 # define php_cdb_findnext(cdb, key, len) cdb_findnext(cdb, key, len) argument 138 # define php_cdb_find(cdb, key, len) cdb_find(cdb, key, len) argument 140 # define php_cdb_read(cdb, buf, len, pos) cdb_read(cdb, buf, len, pos) argument 141 # define php_cdb_findnext(cdb, key, len) cdb_findnext(cdb, key, len) argument 142 # define php_cdb_find(cdb, key, len) cdb_find(cdb, key, len) argument 148 unsigned int len; in DBA_FETCH_FUNC() local 161 len = cdb_datalen(&cdb->c); in DBA_FETCH_FUNC() 162 new_entry = safe_emalloc(len, 1, 1); in DBA_FETCH_FUNC() 168 new_entry[len] = 0; in DBA_FETCH_FUNC() [all …]
|
/PHP-8.0/ext/iconv/tests/ |
H A D | iconv_substr.phpt | 10 $len = strlen($str); 11 for ($i = 0; $i < $len; ++$i) { 17 function foo($str, $offset, $len, $charset) { 18 hexdump(substr($str, $offset, $len)); 19 hexdump(iconv_substr($str, $offset, $len, $charset)); 22 function bar($str, $offset, $len = false) { 23 if (is_bool($len)) { 27 var_dump(substr($str, $offset, $len)); 28 var_dump(iconv_substr($str, $offset, $len));
|
/PHP-8.0/ext/standard/tests/file/ |
H A D | fgets_error.phpt | 11 $len = 0; 13 var_dump( fgets($fp, $len) ); 18 $len = -10; 20 var_dump( fgets($fp, $len) ); 24 $len = 1; 25 var_dump( fgets($fp, $len) ); // return length - 1 always, expect false
|
/PHP-8.0/ext/hash/ |
H A D | hash_crc32.c | 28 PHP_HASH_API void PHP_CRC32Update(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) in PHP_CRC32Update() argument 33 i += crc32_x86_simd_update(X86_CRC32, &context->state, input, len); in PHP_CRC32Update() 36 for (; i < len; ++i) { in PHP_CRC32Update() 41 PHP_HASH_API void PHP_CRC32BUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) in PHP_CRC32BUpdate() argument 46 i += crc32_x86_simd_update(X86_CRC32B, &context->state, input, len); in PHP_CRC32BUpdate() 49 for (; i < len; ++i) { in PHP_CRC32BUpdate() 54 PHP_HASH_API void PHP_CRC32CUpdate(PHP_CRC32_CTX *context, const unsigned char *input, size_t len) in PHP_CRC32CUpdate() argument 59 i += crc32_x86_simd_update(X86_CRC32C, &context->state, input, len); in PHP_CRC32CUpdate() 62 for (; i < len; ++i) { in PHP_CRC32CUpdate()
|