/php-src/Zend/ |
H A D | zend_smart_str.h | 26 ZEND_API void ZEND_FASTCALL smart_str_erealloc(smart_str *str, size_t len); 27 ZEND_API void ZEND_FASTCALL smart_str_realloc(smart_str *str, size_t len); 43 len += ZSTR_LEN(str->s); in END_EXTERN_C() 44 if (UNEXPECTED(len >= str->a)) { in END_EXTERN_C() 47 smart_str_realloc(str, len); in END_EXTERN_C() 49 smart_str_erealloc(str, len); in END_EXTERN_C() 53 return len; in END_EXTERN_C() 57 size_t new_len = smart_str_alloc(dest, len, persistent); in smart_str_extend_ex() 129 size_t new_len = smart_str_alloc(dest, len, persistent); in smart_str_appendl_ex() 130 memcpy(ZSTR_VAL(dest->s) + ZSTR_LEN(dest->s), str, len); in smart_str_appendl_ex() [all …]
|
H A D | zend_long.h | 64 # define ZEND_LTOA(i, s, len) _i64toa_s((i), (s), (len), 10) argument 72 # define ZEND_LTOA(i, s, len) \ argument 74 int st = snprintf((s), (len), ZEND_LONG_FMT, (i)); \ 93 # define ZEND_LTOA(i, s, len) _ltoa_s((i), (s), (len), 10) argument 96 # define ZEND_LTOA(i, s, len) \ argument 98 int st = snprintf((s), (len), ZEND_LONG_FMT, (i)); \
|
H A D | zend_stream.c | 28 static ssize_t zend_stream_stdio_reader(void *handle, char *buf, size_t len) /* {{{ */ in zend_stream_stdio_reader() argument 30 return fread(buf, 1, len, (FILE*)handle); in zend_stream_stdio_reader() 109 static ssize_t zend_stream_read(zend_file_handle *file_handle, char *buf, size_t len) /* {{{ */ in zend_stream_read() argument 115 for (n = 0; n < len && (c = zend_stream_getc(file_handle)) != EOF && c != '\n'; ++n) { in zend_stream_read() 124 return file_handle->handle.stream.reader(file_handle->handle.stream.handle, buf, len); in zend_stream_read() 133 *len = file_handle->len; in zend_stream_fixup() 173 file_handle->len = size; in zend_stream_fixup() 193 file_handle->len = size; in zend_stream_fixup() 200 if (file_handle->len == 0) { in zend_stream_fixup() 205 memset(file_handle->buf + file_handle->len, 0, ZEND_MMAP_AHEAD); in zend_stream_fixup() [all …]
|
/php-src/ext/hash/ |
H A D | hash_xxhash.c | 59 PHP_HASH_API void PHP_XXH32Update(PHP_XXH32_CTX *ctx, const unsigned char *in, size_t len) in PHP_XXH32Update() argument 61 XXH32_update(&ctx->s, in, len); in PHP_XXH32Update() 125 XXH64_update(&ctx->s, in, len); in PHP_XXH64Update() 180 size_t len = Z_STRLEN_P(_secret); in _PHP_XXH3_Init() local 181 if (len < PHP_XXH3_SECRET_SIZE_MIN) { in _PHP_XXH3_Init() 185 if (len > sizeof(ctx->secret)) { in _PHP_XXH3_Init() 186 len = sizeof(ctx->secret); in _PHP_XXH3_Init() 189 memcpy((unsigned char *)ctx->secret, Z_STRVAL_P(_secret), len); in _PHP_XXH3_Init() 190 func_init_secret(&ctx->s, ctx->secret, len); in _PHP_XXH3_Init() 205 XXH3_64bits_update(&ctx->s, in, len); in PHP_XXH3_64_Update() [all …]
|
/php-src/ext/mysqlnd/ |
H A D | mysqlnd_read_buffer.c | 28 return buffer->len? FALSE:TRUE; in mysqlnd_read_buffer_is_empty() 37 if (buffer->len >= count) { in mysqlnd_read_buffer_read() 40 buffer->len -= count; in mysqlnd_read_buffer_read() 50 return buffer->len; in mysqlnd_read_buffer_bytes_left() 81 ret->size = ret->len = count; in mysqlnd_create_read_buffer()
|
/php-src/ext/hash/murmur/ |
H A D | PMurHash128.h | 31 void PMurHash128x64_Process(uint64_t ph[2], uint64_t pcarry[2], const void *key, int len); 33 void PMurHash128x64(const void * key, const int len, uint32_t seed, void * out); 36 void PMurHash128x86_Process(uint32_t ph[4], uint32_t pcarry[4], const void *key, int len); 38 void PMurHash128x86(const void * key, const int len, uint32_t seed, void * out);
|
H A D | PMurHash128.c | 146 for(;__cnt--; len--) {\ 266 if(i && i <= len) { in PMurHash128x86_Process() 271 end = ptr + (len & ~15); in PMurHash128x86_Process() 285 if(i && i <= len) { in PMurHash128x86_Process() 406 len -= len & ~15; in PMurHash128x86_Process() 409 dobytes128x86(len, h1, h2, h3, h4, k1, k2, k3, k4, n, ptr, len); in PMurHash128x86_Process() 462 for(;__cnt--; len--) {\ 545 if(i && i <= len) { in PMurHash128x64_Process() 562 if(i && i <= len) { in PMurHash128x64_Process() 617 len -= len & ~15; in PMurHash128x64_Process() [all …]
|
/php-src/ext/standard/ |
H A D | base64.h | 70 static inline zend_string *php_base64_encode(const unsigned char *str, size_t len) { in php_base64_encode() argument 71 return php_base64_encode_ex(str, len, 0); in php_base64_encode() 77 static inline zend_string *php_base64_decode(const unsigned char *str, size_t len) { in php_base64_decode() argument 78 return php_base64_decode_ex(str, len, 0); in php_base64_decode()
|
H A D | hrtime.c | 25 # define HRTIME_U64A(i, s, len) _ui64toa_s(i, s, len, 10) argument 27 # define HRTIME_U64A(i, s, len) \ argument 29 int st = snprintf(s, len, "%llu", i); \
|
/php-src/ext/dom/lexbor/lexbor/dom/interfaces/ |
H A D | character_data.c | 91 const lxb_char_t *data, size_t len, in lxb_dom_character_data_replace() argument 95 lexbor_str_init(&ch_data->data, ch_data->node.owner_document->text, len); in lxb_dom_character_data_replace() 100 else if (lexbor_str_size(&ch_data->data) < len) { in lxb_dom_character_data_replace() 104 ch_data->node.owner_document->text, (len + 1)); in lxb_dom_character_data_replace() 110 memcpy(ch_data->data.data, data, sizeof(lxb_char_t) * len); in lxb_dom_character_data_replace() 112 ch_data->data.data[len] = 0x00; in lxb_dom_character_data_replace() 113 ch_data->data.length = len; in lxb_dom_character_data_replace()
|
H A D | processing_instruction.h | 45 size_t *len) in lxb_dom_processing_instruction_target() argument 47 if (len != NULL) { in lxb_dom_processing_instruction_target() 48 *len = pi->target.length; in lxb_dom_processing_instruction_target() 59 size_t *len);
|
H A D | element.c | 662 if (len != NULL) { in lxb_dom_element_qualified_name() 663 *len = data->entry.length; in lxb_dom_element_qualified_name() 680 if (len != NULL) { in lxb_dom_element_qualified_name_upper() 681 *len = data->entry.length; in lxb_dom_element_qualified_name_upper() 712 if (len != NULL) { in lxb_dom_element_upper_update() 713 *len = length; in lxb_dom_element_upper_update() 729 if (len != NULL) { in lxb_dom_element_local_name() 730 *len = 0; in lxb_dom_element_local_name() 736 if (len != NULL) { in lxb_dom_element_local_name() 762 if (len != NULL) { in lxb_dom_element_prefix() [all …]
|
/php-src/ext/opcache/tests/jit/ |
H A D | bug81051.phpt | 32 public function get(int $len) : string{ 33 …return $len === 1 ? $this->buffer[$this->offset++] : substr($this->buffer, ($this->offset += $len)…
|
/php-src/ext/mysqli/tests/ |
H A D | mysqli_fetch_array_large.phpt | 28 $len = strlen($sql); 29 assert($len < $package_size); 39 … printf("[%03d + 1] len = %d, [%d] %s\n", $offset, $len, mysqli_errno($link), mysqli_error($link)); 45 … printf("[%03d + 2] len = %d, [%d] %s\n", $offset, $len, mysqli_errno($link), mysqli_error($link)); 51 printf("[%03d + 3] Wrong results - expecting '%s' got '%s', len = %d, [%d] %s\n", 52 … $offset, $random_char, $row['label'], $len, mysqli_errno($link), mysqli_error($link)); 59 … printf("[%03d + 4] len = %d, [%d] %s\n", $offset, $len, mysqli_errno($link), mysqli_error($link)); 65 …printf("[%03d + 5] len = %d, [%d] %s, [%d] %s\n", $offset, $len, mysqli_stmt_errno($stmt), mysqli_… 71 …printf("[%03d + 6] len = %d, [%d] %s, [%d] %s\n", $offset, $len, mysqli_stmt_errno($stmt), mysqli_… 77 printf("[%03d + 7] Wrong results - expecting '%s' got '%s', len = %d, [%d] %s\n", [all …]
|
/php-src/ext/opcache/jit/ir/ |
H A D | ir_private.h | 485 uint32_t len; member 495 set->len = 0; in ir_sparse_set_init() 505 set->len = 0; in ir_sparse_set_clear() 548 set->len--; in ir_sparse_set_del() 554 set->len--; in ir_sparse_set_pop() 573 uint32_t len; member 690 uint32_t len; member 700 l->len = 0; in ir_list_init() 706 l->len = 0; in ir_list_free() 711 l->len = 0; in ir_list_clear() [all …]
|
/php-src/ext/pdo_odbc/ |
H A D | odbc_stmt.c | 175 int len; in odbc_stmt_execute() local 239 if (len == 0) { in odbc_stmt_execute() 379 P->len *= 2; in odbc_stmt_param_hook() 395 P->len, in odbc_stmt_param_hook() 396 &P->len in odbc_stmt_param_hook() 431 P->len = 0; in odbc_stmt_param_hook() 443 ptr += len; in odbc_stmt_param_hook() 444 P->len += len; in odbc_stmt_param_hook() 452 P->len = 0; in odbc_stmt_param_hook() 482 P->len = ulen; in odbc_stmt_param_hook() [all …]
|
/php-src/tests/output/ |
H A D | ob_start_basic_006.phpt | 12 $len = strlen($string); 13 return "f[call:$i; len:$len] - $string\n"; 26 $len = strlen($string); 27 return "C::g[call:$i; len:$len] - $string\n"; 33 $len = strlen($string); 34 return "C::h[call:$i; len:$len; id:$this->id] - $string\n"; 115 C::h[call:1; len:37; id:originalID] - bool(true) 121 C::h[call:2; len:37; id:changedID] - bool(true)
|
/php-src/ext/pcre/pcre2lib/ |
H A D | pcre2_string_utils.c | 157 PRIV(strncmp)(PCRE2_SPTR str1, PCRE2_SPTR str2, size_t len) in PRIV() 160 for (; len > 0; len--) in PRIV() 186 PRIV(strncmp_c8)(PCRE2_SPTR str1, const char *str2, size_t len) in PRIV() 189 for (; len > 0; len--) in PRIV()
|
/php-src/sapi/litespeed/ |
H A D | lsapilib.h | 171 ssize_t LSAPI_ReadReqBody_r( LSAPI_Request * pReq, char * pBuf, size_t len ); 316 static inline ssize_t LSAPI_ReadReqBody( char * pBuf, size_t len ) in LSAPI_ReadReqBody() argument 317 { return LSAPI_ReadReqBody_r( &g_req, pBuf, len ); } in LSAPI_ReadReqBody() 322 static inline int LSAPI_ReqBodyGetLine( char * pBuf, int len, int *getLF ) in LSAPI_ReqBodyGetLine() argument 323 { return LSAPI_ReqBodyGetLine_r( &g_req, pBuf, len, getLF ); } in LSAPI_ReqBodyGetLine() 330 static inline ssize_t LSAPI_Write( const char * pBuf, ssize_t len ) in LSAPI_Write() argument 331 { return LSAPI_Write_r( &g_req, pBuf, len ); } in LSAPI_Write() 338 static inline ssize_t LSAPI_Write_Stderr( const char * pBuf, ssize_t len ) in LSAPI_Write_Stderr() argument 339 { return LSAPI_Write_Stderr_r( &g_req, pBuf, len ); } in LSAPI_Write_Stderr() 344 static inline int LSAPI_AppendRespHeader( char * pBuf, int len ) in LSAPI_AppendRespHeader() argument [all …]
|
/php-src/main/ |
H A D | snprintf.h | 72 PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) ZEND_ATTRIBUTE_FORMAT(pri… 73 PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list ap); 80 bool add_dp, int precision, char dec_point, bool * is_negative, char *buf, size_t *len); 131 bool * is_negative, char *buf_end, size_t *len); 134 char format, char *buf_end, size_t *len);
|
H A D | snprintf.c | 253 *len = buf_end - p; in ap_php_conv_10() 292 *len = strlen(p); in php_conv_fp() 293 memcpy(buf, p, *len + 1); in php_conv_fp() 360 *len = s - buf; in php_conv_fp() 390 *len = buf_end - p; in ap_php_conv_p2() 1083 if (len == 0) { in strx_printv() 1087 od.buf_end = &buf[len-1]; in strx_printv() 1110 if (cc >= len) { in ap_php_slprintf() 1111 cc = len -1; in ap_php_slprintf() 1121 if (cc >= len) { in ap_php_vslprintf() [all …]
|
H A D | php_ini_builder.c | 65 const size_t len = strlen(arg); in php_ini_builder_define() local 71 php_ini_builder_quoted(b, arg, val - arg - 1, val, arg + len - val); in php_ini_builder_define() 73 php_ini_builder_realloc(b, len + strlen("\n")); in php_ini_builder_define() 74 memcpy(b->value + b->length, arg, len); in php_ini_builder_define() 75 b->length += len; in php_ini_builder_define() 79 php_ini_builder_unquoted(b, arg, len, "1", 1); in php_ini_builder_define()
|
/php-src/ext/dom/lexbor/lexbor/core/ |
H A D | conv.h | 19 lexbor_conv_float_to_data(double num, lxb_char_t *buf, size_t len); 22 lexbor_conv_long_to_data(long num, lxb_char_t *buf, size_t len); 25 lexbor_conv_int64_to_data(int64_t num, lxb_char_t *buf, size_t len); 28 lexbor_conv_data_to_double(const lxb_char_t **start, size_t len);
|
H A D | str.c | 566 while (len) { in lexbor_str_data_to_lowercase() 567 len--; in lexbor_str_data_to_lowercase() 569 to[len] = lexbor_str_res_map_lowercase[ from[len] ]; in lexbor_str_data_to_lowercase() 576 while (len) { in lexbor_str_data_to_uppercase() 577 len--; in lexbor_str_data_to_uppercase() 579 to[len] = lexbor_str_res_map_uppercase[ from[len] ]; in lexbor_str_data_to_uppercase() 586 while (len) { in lexbor_str_data_find_lowercase() 587 len--; in lexbor_str_data_find_lowercase() 589 if (data[len] == lexbor_str_res_map_lowercase[ data[len] ]) { in lexbor_str_data_find_lowercase() 600 while (len) { in lexbor_str_data_find_uppercase() [all …]
|
/php-src/ext/intl/idn/ |
H A D | idn.c | 66 int32_t len; in php_intl_idn_to_46() local 78 len = uidna_nameToASCII_UTF8(uts46, ZSTR_VAL(domain), ZSTR_LEN(domain), in php_intl_idn_to_46() 80 …if (len >= buffer_capac || php_intl_idn_check_status(status, "failed to convert name") == FAILURE)… in php_intl_idn_to_46() 88 len = uidna_nameToUnicodeUTF8(uts46, ZSTR_VAL(domain), ZSTR_LEN(domain), in php_intl_idn_to_46() 90 …if (len >= buffer_capac || php_intl_idn_check_status(status, "failed to convert name") == FAILURE)… in php_intl_idn_to_46() 97 ZSTR_VAL(buffer)[len] = '\0'; in php_intl_idn_to_46() 98 ZSTR_LEN(buffer) = len; in php_intl_idn_to_46()
|