/PHP-8.0/Zend/ |
H A D | zend_smart_str.c | 35 str->s = zend_string_alloc(str->a, 0); in smart_str_erealloc() 39 …str->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() 129 if (!str->c) { in _smart_string_alloc_persistent() 136 str->c = pemalloc(str->a + 1, 1); in _smart_string_alloc_persistent() 143 str->c = perealloc(str->c, str->a + 1, 1); in _smart_string_alloc_persistent() 157 str->c = emalloc_large(str->a + 1); in _smart_string_alloc() 160 str->c = emalloc(str->a + 1); in _smart_string_alloc() [all …]
|
H A D | zend_smart_string.h | 35 #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 D | zend_string.c | 49 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 D | zend_ast.c | 84 ZVAL_STR(&zv, str); in zend_ast_create_zval_from_str() 970 smart_str_appendc(str, c); in zend_ast_export_str() 972 smart_str_appendc(str, c); in zend_ast_export_str() 1017 smart_str_appendc(str, c); in zend_ast_export_qstr() 2195 smart_str_appends(str, op); in zend_ast_export_ex() 2202 smart_str_appends(str, op); in zend_ast_export_ex() 2210 smart_str_appends(str, op); in zend_ast_export_ex() 2215 smart_str_appends(str, op); in zend_ast_export_ex() 2245 smart_str str = {0}; in zend_ast_export() local 2250 smart_str_0(&str); in zend_ast_export() [all …]
|
H A D | zend_string.h | 103 #define ZSTR_ALLOCA_FREE(str, use_heap) free_alloca(str, use_heap) argument 361 …(ZSTR_LEN(str) == sizeof(c) - 1 && !zend_binary_strcasecmp(ZSTR_VAL(str), ZSTR_LEN(str), (c), size… 429 str[2] * 33 + in zend_inline_hash_func() 430 str[3]; in zend_inline_hash_func() 435 str[6] * 33 + in zend_inline_hash_func() 436 str[7]; in zend_inline_hash_func() 444 str[2] * 33 + in zend_inline_hash_func() 445 str[3]; in zend_inline_hash_func() 447 str += 4; in zend_inline_hash_func() 455 str[2]; in zend_inline_hash_func() [all …]
|
H A D | zend_smart_str.h | 61 len += ZSTR_LEN(str->s); in END_EXTERN_C() 82 if (str->s) { in smart_str_free_ex() 84 str->s = NULL; in smart_str_free_ex() 86 str->a = 0; in smart_str_free_ex() 90 if (str->s) { in smart_str_0() 91 ZSTR_VAL(str->s)[ZSTR_LEN(str->s)] = '\0'; in smart_str_0() local 96 return str->s ? ZSTR_LEN(str->s) : 0; in smart_str_get_len() 100 if (str->s) { in smart_str_extract() 102 smart_str_0(str); in smart_str_extract() 103 res = str->s; in smart_str_extract() [all …]
|
/PHP-8.0/Zend/tests/ |
H A D | empty_str_offset.phpt | 8 $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 D | str_offset_004.phpt | 11 $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 D | isset_str_offset.phpt | 8 $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 D | bug53432.phpt | 6 $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 D | bug48770_3.phpt | 7 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 …]
|
H A D | bug48770_2.phpt | 7 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 D | str_offset_001.phpt | 11 $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 D | str_offset_003.phpt | 11 $str = "abcdef"; 12 var_dump($str[-10]); 13 var_dump($str[-3]); 14 var_dump($str[2][-2]); 15 var_dump($str[2][-1]); 17 foo($str[-10]); 18 foo($str[-3]); 19 foo($str[2][-2]); 20 foo($str[2][-1]);
|
/PHP-8.0/ext/filter/ |
H A D | logical_filters.c | 114 if (str < end && *str >= '1' && *str <= '9') { in php_filter_parse_int() 127 if (*str >= '0' && *str <= '9') { in php_filter_parse_int() 151 if (*str >= '0' && *str <= '7') { in php_filter_parse_octal() 175 if (*str >= '0' && *str <= '9') { in php_filter_parse_hex() 390 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float() 396 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float() 400 if (str == end || *str == dec_sep || *str == 'e' || *str == 'E') { in php_filter_float() 407 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float() 413 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float() 416 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float() [all …]
|
/PHP-8.0/ext/mbstring/tests/ |
H A D | mb_preferred_mime_name.phpt | 10 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 D | casemapping.phpt | 8 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 D | mb_check_encoding.phpt | 9 $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.0/ext/sodium/tests/ |
H A D | inc_add.phpt | 15 $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.0/ext/standard/tests/strings/ |
H A D | strcspn_variation9.phpt | 46 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 "helloworld 93 -- Iteration with str value "" -- 96 -- Iteration with str value "helloworld" -- 99 -- Iteration with str value "hello\0world" -- 102 -- Iteration with str value "helloworld" -- [all …]
|
H A D | strspn_variation9.phpt | 46 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 "helloworld 93 -- Iteration with str value "" -- 96 -- Iteration with str value "helloworld" -- 99 -- Iteration with str value "hello\0world" -- 102 -- Iteration with str value "helloworld" -- [all …]
|
H A D | substr_replace.phpt | 5 $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 …]
|
H A D | bug61038.phpt | 2 Bug #61038: unpack("a5", "str\0\0") does not work as expected 5 var_dump(unpack("a4", "str\0\0")); 6 var_dump(unpack("a5", "str\0\0")); 7 var_dump(unpack("a6", "str\0\0")); 8 var_dump(unpack("a*", "str\0\0")); 13 string(4) "str%c" 17 string(5) "str%c%c" 24 string(5) "str%c%c"
|
/PHP-8.0/ext/standard/ |
H A D | base64.h | 67 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.0/ext/iconv/tests/ |
H A D | bug69840.phpt | 7 $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]));
|