Home
last modified time | relevance | path

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

12345678910>>...31

/PHP-7.4/Zend/
H A Dzend_smart_str.c37 str->s = zend_string_alloc(str->a, 0); in smart_str_erealloc()
41str->s = (zend_string *) erealloc2(str->s, str->a + _ZSTR_HEADER_SIZE + 1, _ZSTR_HEADER_SIZE + ZST… in smart_str_erealloc()
51 str->s = zend_string_alloc(str->a, 1); in smart_str_realloc()
55 str->s = (zend_string *) perealloc(str->s, str->a + _ZSTR_HEADER_SIZE + 1, 1); in smart_str_realloc()
83 res = &ZSTR_VAL(str->s)[ZSTR_LEN(str->s)]; in smart_str_append_escaped()
131 if (!str->c) { in _smart_string_alloc_persistent()
138 str->c = pemalloc(str->a + 1, 1); in _smart_string_alloc_persistent()
145 str->c = perealloc(str->c, str->a + 1, 1); in _smart_string_alloc_persistent()
159 str->c = emalloc_large(str->a + 1); in _smart_string_alloc()
162 str->c = emalloc(str->a + 1); in _smart_string_alloc()
[all …]
H A Dzend_smart_string.h37 #define smart_string_sets(str, src) \ argument
57 if (UNEXPECTED(!str->c) || UNEXPECTED(len >= str->a - str->len)) { in smart_string_alloc()
61 _smart_string_alloc(str, len); in smart_string_alloc()
64 return str->len + len; in smart_string_alloc()
68 if (str->c) { in smart_string_free_ex()
69 pefree(str->c, persistent); in smart_string_free_ex()
70 str->c = NULL; in smart_string_free_ex()
72 str->a = str->len = 0; in smart_string_free_ex()
76 if (str->c) { in smart_string_0()
77 str->c[str->len] = '\0'; in smart_string_0()
[all …]
H A Dzend_string.c49 return ZSTR_H(str) = zend_hash_func(ZSTR_VAL(str), ZSTR_LEN(str)); in zend_string_hash_func()
60 pefree(str, GC_FLAGS(str) & IS_STR_PERSISTENT); in _str_dtor()
64 #define _ZEND_STR_DSC(id, str) str, argument
82 zend_string *str; in zend_interned_strings_init() local
176 return str; in zend_add_interned_string()
190 return str; in zend_new_interned_string_permanent()
204 str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 1); in zend_new_interned_string_permanent()
205 ZSTR_H(str) = h; in zend_new_interned_string_permanent()
216 return str; in zend_new_interned_string_request()
245 str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 0); in zend_new_interned_string_request()
[all …]
H A Dzend_ast.c84 ZVAL_STR(&zv, str); in zend_ast_create_zval_from_str()
934 smart_str_appendc(str, c); in zend_ast_export_str()
936 smart_str_appendc(str, c); in zend_ast_export_str()
981 smart_str_appendc(str, c); in zend_ast_export_qstr()
2048 smart_str_appends(str, op); in zend_ast_export_ex()
2055 smart_str_appends(str, op); in zend_ast_export_ex()
2063 smart_str_appends(str, op); in zend_ast_export_ex()
2068 smart_str_appends(str, op); in zend_ast_export_ex()
2098 smart_str str = {0}; in zend_ast_export() local
2103 smart_str_0(&str); in zend_ast_export()
[all …]
H A Dzend_string.h95 #define ZSTR_ALLOCA_FREE(str, use_heap) free_alloca(str, use_heap) argument
329 …(ZSTR_LEN(str) == sizeof(c) - 1 && !zend_binary_strcasecmp(ZSTR_VAL(str), ZSTR_LEN(str), (c), size…
397 str[2] * 33 + in zend_inline_hash_func()
398 str[3]; in zend_inline_hash_func()
403 str[6] * 33 + in zend_inline_hash_func()
404 str[7]; in zend_inline_hash_func()
412 str[2] * 33 + in zend_inline_hash_func()
413 str[3]; in zend_inline_hash_func()
415 str += 4; in zend_inline_hash_func()
423 str[2]; in zend_inline_hash_func()
[all …]
H A Dzend_smart_str.h63 len += ZSTR_LEN(str->s); in END_EXTERN_C()
84 if (str->s) { in smart_str_free_ex()
86 str->s = NULL; in smart_str_free_ex()
88 str->a = 0; in smart_str_free_ex()
92 if (str->s) { in smart_str_0()
93 ZSTR_VAL(str->s)[ZSTR_LEN(str->s)] = '\0'; in smart_str_0() local
98 return str->s ? ZSTR_LEN(str->s) : 0; in smart_str_get_len()
102 if (str->s) { in smart_str_extract()
104 smart_str_0(str); in smart_str_extract()
105 res = str->s; in smart_str_extract()
[all …]
/PHP-7.4/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 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 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 Dbug53432.phpt6 $str = '';
8 var_dump($str);
10 $str = '';
12 var_dump($str);
14 $str = '';
16 var_dump($str);
18 $str = '';
20 var_dump($str);
22 $str = '';
30 $str = '';
[all …]
H A Dbug48770_3.phpt9 public function func($str) {
10 var_dump(__METHOD__ .': '. $str);
12 private function func2($str) {
13 var_dump(__METHOD__ .': '. $str);
15 protected function func3($str) {
16 var_dump(__METHOD__ .': '. $str);
18 private function func22($str) {
24 public function func($str) {
29 private function func2($str) {
38 public function func($str) {
[all …]
H A Dbug48770.phpt9 public function func($str) {
10 var_dump(__METHOD__ .': '. $str);
12 private function func2($str) {
13 var_dump(__METHOD__ .': '. $str);
15 protected function func3($str) {
16 var_dump(__METHOD__ .': '. $str);
18 private function func22($str) {
24 public function func($str) {
34 private function func2($str) {
43 public function func($str) {
[all …]
H A Dbug48770_2.phpt9 public function func($str) {
10 var_dump(__METHOD__ .': '. $str);
12 private function func2($str) {
13 var_dump(__METHOD__ .': '. $str);
15 protected function func3($str) {
16 var_dump(__METHOD__ .': '. $str);
18 private function func22($str) {
24 public function func($str) {
30 private function func2($str) {
39 public function func($str) {
[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 …]
/PHP-7.4/ext/filter/
H A Dlogical_filters.c116 if (str < end && *str >= '1' && *str <= '9') { in php_filter_parse_int()
129 if (*str >= '0' && *str <= '9') { in php_filter_parse_int()
153 if (*str >= '0' && *str <= '7') { in php_filter_parse_octal()
177 if (*str >= '0' && *str <= '9') { in php_filter_parse_hex()
389 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float()
395 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float()
399 if (str == end || *str == dec_sep || *str == 'e' || *str == 'E') { in php_filter_float()
406 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float()
412 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float()
415 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float()
[all …]
/PHP-7.4/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-7.4/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-7.4/ext/standard/tests/strings/
H A Dstrcspn_variation9.phpt46 foreach($strings as $str) {
47 echo "\n-- Iteration with str value \"$str\" --\n";
58 -- Iteration with str value "" --
61 -- Iteration with str value "" --
64 -- Iteration with str value "
86 -- Iteration with str value "hello�world
93 -- Iteration with str value "��" --
96 -- Iteration with str value "�hello�world�" --
99 -- Iteration with str value "�hello\0world�" --
102 -- Iteration with str value "hello�world" --
[all …]
H A Dstrspn_variation9.phpt46 foreach($strings as $str) {
47 echo "\n-- Iteration with str value \"$str\" --\n";
58 -- Iteration with str value "" --
61 -- Iteration with str value "" --
64 -- Iteration with str value "
86 -- Iteration with str value "hello�world
93 -- Iteration with str value "��" --
96 -- Iteration with str value "�hello�world�" --
99 -- Iteration with str value "�hello\0world�" --
102 -- Iteration with str value "hello�world" --
[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-7.4/ext/standard/
H A Dcyr_convert.c202 static char * php_convert_cyr_string(unsigned char *str, size_t length, char from, char to) in php_convert_cyr_string() argument
256 if (!str) in php_convert_cyr_string()
257 return (char *)str; in php_convert_cyr_string()
260 tmp = (from_table == NULL)? str[i] : from_table[ str[i] ]; in php_convert_cyr_string()
261 str[i] = (to_table == NULL) ? tmp : to_table[tmp + 256]; in php_convert_cyr_string()
263 return (char *)str; in php_convert_cyr_string()
273 zend_string *str; in PHP_FUNCTION() local
281 str = zend_string_init(input, input_len, 0); in PHP_FUNCTION()
283 php_convert_cyr_string((unsigned char *) ZSTR_VAL(str), ZSTR_LEN(str), fr_cs[0], to_cs[0]); in PHP_FUNCTION()
284 RETVAL_NEW_STR(str); in PHP_FUNCTION()
H A Dbase64.h72 static inline zend_string *php_base64_encode_str(const zend_string *str) { in php_base64_encode_str() argument
73 return php_base64_encode((const unsigned char*)(ZSTR_VAL(str)), ZSTR_LEN(str)); in php_base64_encode_str()
76 static inline zend_string *php_base64_decode(const unsigned char *str, size_t len) { in php_base64_decode() argument
77 return php_base64_decode_ex(str, len, 0); in php_base64_decode()
79 static inline zend_string *php_base64_decode_str(const zend_string *str) { in php_base64_decode_str() argument
80 return php_base64_decode_ex((const unsigned char*)(ZSTR_VAL(str)), ZSTR_LEN(str), 0); in php_base64_decode_str()
/PHP-7.4/ext/xmlrpc/libxmlrpc/
H A Dsimplestring.c114 string->str = (char*)emalloc(SIMPLESTRING_INCR); in simplestring_init_str()
115 if(string->str) { in simplestring_init_str()
116 string->str[0] = 0; in simplestring_init_str()
143 if(string->str) { in simplestring_clear()
144 string->str[0] = 0; in simplestring_clear()
168 if(string && string->str) { in simplestring_free()
169 my_free(string->str); in simplestring_free()
199 if(!target->str) { in simplestring_addn()
221 target->str = (char*)erealloc(target->str, newsize); in simplestring_addn()
223 target->size = target->str ? newsize : 0; in simplestring_addn()
[all …]

Completed in 54 milliseconds

12345678910>>...31