/PHP-7.1/Zend/tests/ |
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 | 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])); 17 var_dump(empty($str[8])); 18 var_dump(empty($str[10000])); 21 var_dump(empty($str['-1'])); 24 var_dump(empty($str['0'])); [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 16 var_dump(isset($str[8])); 17 var_dump(isset($str[10000])); 20 var_dump(isset($str['-1'])); 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 = ''; 20 var_dump($str); 22 $str = ''; 30 $str = ''; [all …]
|
H A D | bug48770.phpt | 9 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 D | bug48770_3.phpt | 9 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 D | bug48770_2.phpt | 9 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 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-7.1/Zend/ |
H A D | zend_ast.c | 608 smart_str_appendc(str, c); in zend_ast_export_str() 610 smart_str_appendc(str, c); in zend_ast_export_str() 655 smart_str_appendc(str, c); in zend_ast_export_qstr() 751 smart_str_appendc(str, '{'); in zend_ast_export_var() 753 smart_str_appendc(str, '}'); in zend_ast_export_var() 1676 smart_str_appends(str, op); in zend_ast_export_ex() 1683 smart_str_appends(str, op); in zend_ast_export_ex() 1691 smart_str_appends(str, op); in zend_ast_export_ex() 1726 smart_str str = {0}; in zend_ast_export() local 1731 smart_str_0(&str); in zend_ast_export() [all …]
|
H A D | zend_smart_str.c | 37 if (UNEXPECTED(!str->s)) { in smart_str_erealloc() 41 str->s = zend_string_alloc(str->a, 0); in smart_str_erealloc() 42 ZSTR_LEN(str->s) = 0; in smart_str_erealloc() 45 …str->s = (zend_string *) erealloc2(str->s, _ZSTR_HEADER_SIZE + str->a + 1, _ZSTR_HEADER_SIZE + ZST… in smart_str_erealloc() 51 if (UNEXPECTED(!str->s)) { in smart_str_realloc() 55 str->s = zend_string_alloc(str->a, 1); in smart_str_realloc() 56 ZSTR_LEN(str->s) = 0; in smart_str_realloc() 59 str->s = (zend_string *) realloc(str->s, _ZSTR_HEADER_SIZE + str->a + 1); in smart_str_realloc() 86 smart_str_alloc(str, len, 0); in smart_str_append_escaped() 87 res = &ZSTR_VAL(str->s)[ZSTR_LEN(str->s)]; in smart_str_append_escaped() [all …]
|
H A D | zend_string.h | 51 #define STR_ALLOCA_ALLOC(str, _len, use_heap) ZSTR_ALLOCA_ALLOC(str, _len, use_heap) in END_EXTERN_C() argument 52 #define STR_ALLOCA_INIT(str, s, len, use_heap) ZSTR_ALLOCA_INIT(str, s, len, use_heap) in END_EXTERN_C() argument 53 #define STR_ALLOCA_FREE(str, use_heap) ZSTR_ALLOCA_FREE(str, use_heap) in END_EXTERN_C() argument 67 GC_REFCOUNT(str) = 1; \ in END_EXTERN_C() 70 ZSTR_LEN(str) = _len; \ in END_EXTERN_C() 76 ZSTR_VAL(str)[(len)] = '\0'; \ 79 #define ZSTR_ALLOCA_FREE(str, use_heap) free_alloca(str, use_heap) argument 287 …(ZSTR_LEN(str) == sizeof(c) - 1 && !zend_binary_strcasecmp(ZSTR_VAL(str), ZSTR_LEN(str), (c), size… 365 zend_string *str; in zend_zts_interned_string_init() local 369 zend_string_hash_val(str); in zend_zts_interned_string_init() [all …]
|
H A D | zend_smart_str.h | 53 if (UNEXPECTED(!str->s)) { in END_EXTERN_C() 56 len += ZSTR_LEN(str->s); in END_EXTERN_C() 57 if (UNEXPECTED(len >= str->a)) { in END_EXTERN_C() 60 smart_str_realloc(str, len); in END_EXTERN_C() 62 smart_str_erealloc(str, len); in END_EXTERN_C() 70 if (str->s) { in smart_str_free() 71 zend_string_release(str->s); in smart_str_free() 72 str->s = NULL; in smart_str_free() 74 str->a = 0; in smart_str_free() 78 if (str->s) { in smart_str_0() [all …]
|
H A D | zend_string.c | 41 pefree(str, GC_FLAGS(str) & IS_STR_PERSISTENT); in _str_dtor() 69 #define _ZEND_STR_DSC(id, str) str, argument 84 zend_string *str; in zend_interned_strings_init() local 95 ZSTR_VAL(str)[0] = '\000'; in zend_interned_strings_init() local 138 return str; in zend_new_interned_string_int() 147 if (!memcmp(ZSTR_VAL(p->key), ZSTR_VAL(str), ZSTR_LEN(str))) { in zend_new_interned_string_int() 155 GC_REFCOUNT(str) = 1; in zend_new_interned_string_int() 184 p->key = str; in zend_new_interned_string_int() 185 Z_STR(p->val) = str; in zend_new_interned_string_int() 191 return str; in zend_new_interned_string_int() [all …]
|
/PHP-7.1/ext/filter/ |
H A D | logical_filters.c | 106 if (str < end && *str >= '1' && *str <= '9') { in php_filter_parse_int() 119 if (*str >= '0' && *str <= '9') { in php_filter_parse_int() 143 if (*str >= '0' && *str <= '7') { in php_filter_parse_octal() 167 if (*str >= '0' && *str <= '9') { in php_filter_parse_hex() 358 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float() 364 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float() 368 if (str == end || *str == dec_sep || *str == 'e' || *str == 'E') { in php_filter_float() 375 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float() 381 if (str < end && (*str == '+' || *str == '-')) { in php_filter_float() 384 while (str < end && *str >= '0' && *str <= '9') { in php_filter_float() [all …]
|
/PHP-7.1/ext/mbstring/tests/ |
H A D | mb_preferred_mime_name.phpt | 15 echo "$str\n"; 17 $str = mb_preferred_mime_name('SJIS'); 18 echo "$str\n"; 21 echo "$str\n"; 24 echo "$str\n"; 27 echo "$str\n"; 29 $str = mb_preferred_mime_name('JIS'); 30 echo "$str\n"; 33 echo "$str\n"; 36 echo "$str\n"; [all …]
|
/PHP-7.1/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-7.1/ext/xmlrpc/libxmlrpc/ |
H A D | simplestring.c | 115 string->str = (char*)malloc(SIMPLESTRING_INCR); in simplestring_init_str() 116 if(string->str) { in simplestring_init_str() 117 string->str[0] = 0; in simplestring_init_str() 144 if(string->str) { in simplestring_clear() 145 string->str[0] = 0; in simplestring_clear() 169 if(string && string->str) { in simplestring_free() 170 my_free(string->str); in simplestring_free() 200 if(!target->str) { in simplestring_addn() 222 target->str = (char*)realloc(target->str, newsize); in simplestring_addn() 224 target->size = target->str ? newsize : 0; in simplestring_addn() [all …]
|
/PHP-7.1/ext/standard/ |
H A D | cyr_convert.c | 204 static char * php_convert_cyr_string(unsigned char *str, size_t length, char from, char to) in php_convert_cyr_string() argument 258 if (!str) in php_convert_cyr_string() 259 return (char *)str; in php_convert_cyr_string() 262 tmp = (from_table == NULL)? str[i] : from_table[ str[i] ]; in php_convert_cyr_string() 263 str[i] = (to_table == NULL) ? tmp : to_table[tmp + 256]; in php_convert_cyr_string() 265 return (char *)str; in php_convert_cyr_string() 275 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()
|
/PHP-7.1/ext/iconv/tests/ |
H A D | bug69840.phpt | 5 $str = iconv_substr("a\x00b\x00", 0, 1, 'UTF-16LE'); 6 var_dump(strlen($str)); 7 var_dump(ord($str[0])); 8 var_dump(ord($str[1])); 9 $str = iconv_substr("\x00a\x00b", 0, 1, 'UTF-16BE'); 10 var_dump(strlen($str)); 11 var_dump(ord($str[0])); 12 var_dump(ord($str[1]));
|
/PHP-7.1/ext/zip/lib/ |
H A D | zip_set_name.c | 45 zip_string_t *str; in _zip_set_name() local 66 str->encoding = ZIP_ENCODING_UTF8_KNOWN; in _zip_set_name() 69 str = NULL; in _zip_set_name() 73 _zip_string_free(str); in _zip_set_name() 80 _zip_string_free(str); in _zip_set_name() 94 _zip_string_free(str); in _zip_set_name() 100 _zip_string_free(str); in _zip_set_name() 116 _zip_string_free(str); in _zip_set_name() 125 _zip_string_free(str); in _zip_set_name() 147 _zip_string_free(str); in _zip_set_name() [all …]
|
/PHP-7.1/ext/bcmath/libbcmath/src/ |
H A D | num2str.c | 47 zend_string *str; local 55 str = zend_string_alloc(num->n_len + num->n_scale + signch + 1, 0); 57 str = zend_string_alloc(num->n_len + signch, 0); 58 if (str == NULL) bc_out_of_memory(); 61 sptr = ZSTR_VAL(str); 79 ZSTR_LEN(str) = sptr - (char *)ZSTR_VAL(str); 80 return str;
|