Home
last modified time | relevance | path

Searched refs:str (Results 1 – 25 of 746) sorted by relevance

12345678910>>...30

/PHP-8.2/Zend/
H A Dzend_smart_str.c35 str->s = zend_string_alloc(str->a, 0); in smart_str_erealloc()
39str->s = (zend_string *) erealloc2(str->s, str->a + _ZSTR_HEADER_SIZE + 1, _ZSTR_HEADER_SIZE + ZST… in smart_str_erealloc()
49 str->s = zend_string_alloc(str->a, 1); in smart_str_realloc()
53 str->s = (zend_string *) perealloc(str->s, str->a + _ZSTR_HEADER_SIZE + 1, 1); in smart_str_realloc()
81 res = &ZSTR_VAL(str->s)[ZSTR_LEN(str->s)]; in smart_str_append_escaped()
140 if (!str->c) { in _smart_string_alloc_persistent()
147 str->c = pemalloc(str->a + 1, 1); in _smart_string_alloc_persistent()
154 str->c = perealloc(str->c, str->a + 1, 1); in _smart_string_alloc_persistent()
168 str->c = emalloc_large(str->a + 1); in _smart_string_alloc()
171 str->c = emalloc(str->a + 1); in _smart_string_alloc()
[all …]
H A Dzend_smart_string.h35 #define smart_string_sets(str, src) \ argument
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()
66 if (str->c) { in smart_string_free_ex()
67 pefree(str->c, persistent); in smart_string_free_ex()
68 str->c = NULL; in smart_string_free_ex()
70 str->a = str->len = 0; in smart_string_free_ex()
74 if (str->c) { in smart_string_0()
75 str->c[str->len] = '\0'; in smart_string_0()
[all …]
H A Dzend_string.c57 return ZSTR_H(str) = zend_hash_func(ZSTR_VAL(str), ZSTR_LEN(str)); in zend_string_hash_func()
68 pefree(str, GC_FLAGS(str) & IS_STR_PERSISTENT); in _str_dtor()
72 #define _ZEND_STR_DSC(id, str) str, argument
90 zend_string *str; in zend_interned_strings_init() local
184 return str; in zend_add_interned_string()
198 return str; in zend_new_interned_string_permanent()
212 str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 1); in zend_new_interned_string_permanent()
213 ZSTR_H(str) = h; in zend_new_interned_string_permanent()
224 return str; in zend_new_interned_string_request()
253 str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 0); in zend_new_interned_string_request()
[all …]
H A Dzend_ast.c81 ZVAL_STR(&zv, str); in zend_ast_create_zval_from_str()
1189 smart_str_appendc(str, c); in zend_ast_export_str()
2456 smart_str_appends(str, op); in zend_ast_export_ex()
2463 smart_str_appends(str, op); in zend_ast_export_ex()
2471 smart_str_appends(str, op); in zend_ast_export_ex()
2476 smart_str_appends(str, op); in zend_ast_export_ex()
2483 smart_str_appends(str, op); in zend_ast_export_ex()
2492 smart_str_appends(str, op); in zend_ast_export_ex()
2506 smart_str str = {0}; in zend_ast_export() local
2511 smart_str_0(&str); in zend_ast_export()
[all …]
H A Dzend_smart_str.h69 if (str->s) { in smart_str_free_ex()
71 str->s = NULL; in smart_str_free_ex()
73 str->a = 0; in smart_str_free_ex()
82 if (str->s) { in smart_str_0()
83 ZSTR_VAL(str->s)[ZSTR_LEN(str->s)] = '\0'; in smart_str_0() local
88 return str->s ? ZSTR_LEN(str->s) : 0; in smart_str_get_len()
93 if (str->s && str->a > ZSTR_LEN(str->s)) { in smart_str_trim_to_size_ex()
94 str->s = zend_string_realloc(str->s, ZSTR_LEN(str->s), persistent); in smart_str_trim_to_size_ex()
95 str->a = ZSTR_LEN(str->s); in smart_str_trim_to_size_ex()
105 if (str->s) { in smart_str_extract_ex()
[all …]
H A Dzend_string.h78 #define STR_ALLOCA_FREE(str, use_heap) ZSTR_ALLOCA_FREE(str, use_heap) in END_EXTERN_C() argument
99 ZSTR_H(str) = 0; \ in END_EXTERN_C()
109 #define ZSTR_ALLOCA_FREE(str, use_heap) free_alloca(str, use_heap) argument
374 …(ZSTR_LEN(str) == sizeof(c) - 1 && !zend_binary_strcasecmp(ZSTR_VAL(str), ZSTR_LEN(str), (c), size…
455 str[2] * Z_L(33) + in zend_inline_hash_func()
456 str[3]; in zend_inline_hash_func()
462 str[7]; in zend_inline_hash_func()
471 str[3]; in zend_inline_hash_func()
473 str += 4; in zend_inline_hash_func()
481 str[2]; in zend_inline_hash_func()
[all …]
/PHP-8.2/Zend/tests/
H A Dstr_offset_004.phpt11 $str[2] = 'C';
12 var_dump($str);
14 $str[$i] = 'Z';
15 var_dump($str);
17 $str[-5] = 'P';
18 var_dump($str);
20 $str[$j] = 'Q';
21 var_dump($str);
24 var_dump($str);
26 $str[-strlen($str)] = strtoupper($str[0]); /* An exotic ucfirst() ;) */
[all …]
H A Dbug53432.phpt6 $str = '';
8 var_dump($str);
10 $str = '';
12 var_dump($str);
14 $str = '';
16 var_dump($str);
18 $str = '';
24 var_dump($str);
26 $str = '';
34 $str = '';
[all …]
H A Disset_str_offset.phpt8 $str = "test0123";
10 var_dump(isset($str[-1]));
11 var_dump(isset($str[-10]));
12 var_dump(isset($str[0]));
13 var_dump(isset($str[1]));
14 var_dump(isset($str[4])); // 0
15 var_dump(isset($str[5])); // 1
16 var_dump(isset($str[8]));
17 var_dump(isset($str[10000]));
22 var_dump(isset($str['0']));
[all …]
H A Dempty_str_offset.phpt8 $str = "test0123";
10 var_dump(empty($str[-1]));
11 var_dump(empty($str[-10]));
12 var_dump(empty($str[-4])); // 0
13 var_dump(empty($str[0]));
14 var_dump(empty($str[1]));
15 var_dump(empty($str[4])); // 0
17 var_dump(empty($str[8]));
18 var_dump(empty($str[10000]));
23 var_dump(empty($str['0']));
[all …]
H A Dstr_offset_001.phpt11 $str = "abc";
12 var_dump($str[0]);
13 var_dump($str[1]);
14 var_dump($str[2]);
15 var_dump($str[3]);
19 foo($str[0]);
20 foo($str[1]);
21 foo($str[2]);
22 foo($str[3]);
23 foo($str[1][0]);
[all …]
H A Dbug48770_2.phpt7 public function func($str) {
8 var_dump(__METHOD__ .': '. $str);
10 private function func2($str) {
11 var_dump(__METHOD__ .': '. $str);
13 protected function func3($str) {
16 private function func22($str) {
22 public function func($str) {
38 private function func2($str) {
41 protected function func3($str) {
47 public function func($str) {
[all …]
H A Dbug48770_3.phpt7 public function func($str) {
8 var_dump(__METHOD__ .': '. $str);
10 private function func2($str) {
11 var_dump(__METHOD__ .': '. $str);
13 protected function func3($str) {
14 var_dump(__METHOD__ .': '. $str);
19 public function func($str) {
29 private function func2($str) {
32 protected function func3($str) {
38 public function func($str) {
[all …]
/PHP-8.2/ext/filter/
H A Dlogical_filters.c115 if (str < end && *str >= '1' && *str <= '9') { in php_filter_parse_int()
128 if (*str >= '0' && *str <= '9') { in php_filter_parse_int()
152 if (*str >= '0' && *str <= '7') { in php_filter_parse_octal()
176 if (*str >= '0' && *str <= '9') { in php_filter_parse_hex()
398 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float()
404 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float()
408 if (str == end || *str == dec_sep || *str == 'e' || *str == 'E') { in php_filter_float()
415 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float()
421 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float()
424 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float()
[all …]
/PHP-8.2/ext/mbstring/tests/
H A Dmb_preferred_mime_name.phpt10 echo "$str\n";
12 $str = mb_preferred_mime_name('SJIS');
13 echo "$str\n";
16 echo "$str\n";
19 echo "$str\n";
22 echo "$str\n";
24 $str = mb_preferred_mime_name('JIS');
25 echo "$str\n";
28 echo "$str\n";
31 echo "$str\n";
[all …]
H A Dcasemapping.phpt8 function toCases($str) {
9 echo "String: $str\n";
10 echo "Lower: ", mb_convert_case($str, MB_CASE_LOWER), "\n";
31 $str = "\xdd";
32 echo bin2hex(mb_convert_case($str, MB_CASE_LOWER)), "\n";
34 echo bin2hex(mb_convert_case($str, MB_CASE_FOLD)), "\n";
39 $str = "\xfd";
42 echo bin2hex(mb_convert_case($str, MB_CASE_FOLD)), "\n";
47 $str = "\x49";
50 echo bin2hex(mb_convert_case($str, MB_CASE_FOLD)), "\n";
[all …]
H A Dmb_check_encoding.phpt9 $str = "Japanese UTF-8 text. 日本語のUTF-8テキスト";
10 $arr = [1234, 12.34, TRUE, FALSE, NULL, $str, 'key'=>$str, $str=>'val'];
11 var_dump(mb_check_encoding($str), mb_check_encoding($arr));
14 $str = "Japanese UTF-8 text. 日本語\xFE\x01\x02のUTF-8テキスト";
15 $arr1 = [1234, 12.34, TRUE, FALSE, NULL, 'key'=>$str, $str=>'val'];
16 $arr2 = [1234, 12.34, TRUE, FALSE, NULL, $str=>'val'];
17 var_dump(mb_check_encoding($str), mb_check_encoding($arr1), mb_check_encoding($arr2));
/PHP-8.2/ext/sodium/tests/
H A Dinc_add.phpt15 $str = "abc";
16 $str2 = $str;
17 sodium_increment($str);
18 var_dump($str, $str2);
21 $str2 = $str;
22 sodium_increment($str);
23 var_dump($str, $str2);
34 $str = "abc";
35 $str2 = $str;
37 var_dump($str, $str2);
[all …]
/PHP-8.2/ext/standard/tests/strings/
H A Dstrspn_variation9.phpt46 foreach($strings as $str) {
47 echo "\n-- Iteration with str value \"$str\" --\n";
50 var_dump( strspn($str,$mask) );
58 -- Iteration with str value "" --
61 -- Iteration with str value "" --
64 -- Iteration with str value "
68 -- Iteration with str value "\n" --
71 -- Iteration with str value "hello world
86 -- Iteration with str value "hello%0world
93 -- Iteration with str value "%0%0" --
[all …]
H A Dstrcspn_variation9.phpt46 foreach($strings as $str) {
47 echo "\n-- Iteration with str value \"$str\" --\n";
50 var_dump( strcspn($str,$mask) );
58 -- Iteration with str value "" --
61 -- Iteration with str value "" --
64 -- Iteration with str value "
68 -- Iteration with str value "\n" --
71 -- Iteration with str value "hello world
86 -- Iteration with str value "hello%0world
93 -- Iteration with str value "%0%0" --
[all …]
H A Dsubstr_replace.phpt5 $str = "try this";
11 echo "substr_replace('$str', '$repl', $start)\n";
12 var_dump(substr_replace($str, $repl, $start));
33 $str = "try this";
50 $str = array("ala portokala");
78 $str = array("ala portokala");
89 $str = array("ala portokala", "try this");
152 $str = array("ala portokala");
227 $str = array("ala portokala");
303 $str = array("ala portokala");
[all …]
/PHP-8.2/ext/odbc/
H A Dodbc_utils.c30 zend_string *str; in PHP_FUNCTION() local
33 Z_PARAM_STR(str) in PHP_FUNCTION()
36 bool is_quoted = php_odbc_connstr_is_quoted(ZSTR_VAL(str)); in PHP_FUNCTION()
43 zend_string *str; in PHP_FUNCTION() local
46 Z_PARAM_STR(str) in PHP_FUNCTION()
49 bool should_quote = php_odbc_connstr_should_quote(ZSTR_VAL(str)); in PHP_FUNCTION()
56 zend_string *str; in PHP_FUNCTION() local
59 Z_PARAM_STR(str) in PHP_FUNCTION()
62 size_t new_size = php_odbc_connstr_estimate_quote_length(ZSTR_VAL(str)); in PHP_FUNCTION()
64 php_odbc_connstr_quote(ZSTR_VAL(new_string), ZSTR_VAL(str), new_size); in PHP_FUNCTION()
/PHP-8.2/ext/standard/
H A Dbase64.h67 static inline zend_string *php_base64_encode_str(const zend_string *str) { in php_base64_encode_str() argument
68 return php_base64_encode((const unsigned char*)(ZSTR_VAL(str)), ZSTR_LEN(str)); in php_base64_encode_str()
71 static inline zend_string *php_base64_decode(const unsigned char *str, size_t len) { in php_base64_decode() argument
72 return php_base64_decode_ex(str, len, 0); in php_base64_decode()
74 static inline zend_string *php_base64_decode_str(const zend_string *str) { in php_base64_decode_str() argument
75 return php_base64_decode_ex((const unsigned char*)(ZSTR_VAL(str)), ZSTR_LEN(str), 0); in php_base64_decode_str()
/PHP-8.2/main/
H A Dphp_odbc_utils.c39 PHPAPI bool php_odbc_connstr_is_quoted(const char *str) in php_odbc_connstr_is_quoted() argument
42 if (str[0] != '{') { in php_odbc_connstr_is_quoted()
46 size_t length = strlen(str); in php_odbc_connstr_is_quoted()
48 if (str[i] == '}' && str[i + 1] == '}') { in php_odbc_connstr_is_quoted()
51 } else if (str[i] == '}' && str[i + 1] != '\0') { in php_odbc_connstr_is_quoted()
70 PHPAPI bool php_odbc_connstr_should_quote(const char *str) in php_odbc_connstr_should_quote() argument
72 return strpbrk(str, "[]{}(),;?*=!@") != NULL; in php_odbc_connstr_should_quote()
/PHP-8.2/ext/iconv/tests/
H A Dbug69840.phpt7 $str = iconv_substr("a\x00b\x00", 0, 1, 'UTF-16LE');
8 var_dump(strlen($str));
9 var_dump(ord($str[0]));
10 var_dump(ord($str[1]));
11 $str = iconv_substr("\x00a\x00b", 0, 1, 'UTF-16BE');
12 var_dump(strlen($str));
13 var_dump(ord($str[0]));
14 var_dump(ord($str[1]));

Completed in 54 milliseconds

12345678910>>...30