Home
last modified time | relevance | path

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

12345678910>>...36

/PHP-7.3/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.c51 return ZSTR_H(str) = zend_hash_func(ZSTR_VAL(str), ZSTR_LEN(str)); in zend_string_hash_func()
62 pefree(str, GC_FLAGS(str) & IS_STR_PERSISTENT); in _str_dtor()
66 #define _ZEND_STR_DSC(id, str) str, argument
82 zend_string *str; in zend_interned_strings_init() local
178 return str; in zend_add_interned_string()
192 return str; in zend_new_interned_string_permanent()
206 str = zend_string_init(ZSTR_VAL(str), ZSTR_LEN(str), 1); in zend_new_interned_string_permanent()
207 ZSTR_H(str) = h; in zend_new_interned_string_permanent()
218 return str; in zend_new_interned_string_request()
247 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()
868 smart_str_appendc(str, c); in zend_ast_export_str()
870 smart_str_appendc(str, c); in zend_ast_export_str()
915 smart_str_appendc(str, c); in zend_ast_export_qstr()
1948 smart_str_appends(str, op); in zend_ast_export_ex()
1955 smart_str_appends(str, op); in zend_ast_export_ex()
1963 smart_str_appends(str, op); in zend_ast_export_ex()
1968 smart_str_appends(str, op); in zend_ast_export_ex()
1998 smart_str str = {0}; in zend_ast_export() local
2003 smart_str_0(&str); in zend_ast_export()
[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.3/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.3/ext/filter/
H A Dlogical_filters.c104 if (str < end && *str >= '1' && *str <= '9') { in php_filter_parse_int()
117 if (*str >= '0' && *str <= '9') { in php_filter_parse_int()
141 if (*str >= '0' && *str <= '7') { in php_filter_parse_octal()
165 if (*str >= '0' && *str <= '9') { in php_filter_parse_hex()
372 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float()
378 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float()
382 if (str == end || *str == dec_sep || *str == 'e' || *str == 'E') { in php_filter_float()
389 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float()
395 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float()
398 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float()
[all …]
/PHP-7.3/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.3/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.3/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.3/ext/xmlrpc/libxmlrpc/
H A Dsimplestring.c116 string->str = (char*)emalloc(SIMPLESTRING_INCR); in simplestring_init_str()
117 if(string->str) { in simplestring_init_str()
118 string->str[0] = 0; in simplestring_init_str()
145 if(string->str) { in simplestring_clear()
146 string->str[0] = 0; in simplestring_clear()
170 if(string && string->str) { in simplestring_free()
171 my_free(string->str); in simplestring_free()
201 if(!target->str) { in simplestring_addn()
223 target->str = (char*)erealloc(target->str, newsize); in simplestring_addn()
225 target->size = target->str ? newsize : 0; in simplestring_addn()
[all …]
/PHP-7.3/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.h69 static inline zend_string *php_base64_encode_str(const zend_string *str) { in php_base64_encode_str() argument
70 return php_base64_encode((const unsigned char*)(ZSTR_VAL(str)), ZSTR_LEN(str)); in php_base64_encode_str()
73 static inline zend_string *php_base64_decode(const unsigned char *str, size_t len) { in php_base64_decode() argument
74 return php_base64_decode_ex(str, len, 0); in php_base64_decode()
76 static inline zend_string *php_base64_decode_str(const zend_string *str) { in php_base64_decode_str() argument
77 return php_base64_decode_ex((const unsigned char*)(ZSTR_VAL(str)), ZSTR_LEN(str), 0); in php_base64_decode_str()
/PHP-7.3/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 67 milliseconds

12345678910>>...36