/php-src/ext/mbstring/tests/ |
H A D | mb_stripos_basic.phpt | 65 echo "\n -- ASCII Strings, needle should be found --\n"; 66 foreach ($ascii_needles as $needle) { 67 if ($needle == '!') { 72 var_dump(mb_stripos($haystack, $needle)); 78 foreach ($greek_needles as $needle) { 79 if ($needle == '!') { 84 var_dump(mb_stripos($haystack, $needle)); 94 -- ASCII Strings, needle should be found -- 108 -- ASCII Strings, needle should not be found -- 122 -- Greek Strings, needle should be found -- [all …]
|
H A D | mb_strripos_basic.phpt | 65 echo "\n -- ASCII Strings, needle should be found --\n"; 66 foreach ($ascii_needles as $needle) { 67 if ($needle == '!') { 72 var_dump(mb_strripos($haystack, $needle)); 78 foreach ($greek_needles as $needle) { 79 if ($needle == '!') { 84 var_dump(mb_strripos($haystack, $needle)); 94 -- ASCII Strings, needle should be found -- 108 -- ASCII Strings, needle should not be found -- 122 -- Greek Strings, needle should be found -- [all …]
|
H A D | mb_strstr_basic.phpt | 15 echo "\n-- ASCII string: needle exists --\n"; 21 echo "\n-- ASCII string: needle doesn't exist --\n"; 24 echo "\n-- Multibyte string: needle exists --\n"; 31 echo "\n-- Multibyte string: needle doesn't exist --\n"; 39 -- ASCII string: needle exists -- 44 -- ASCII string: needle doesn't exist -- 47 -- Multibyte string: needle exists -- 52 -- Multibyte string: needle doesn't exist --
|
H A D | mb_stristr_basic.phpt | 22 echo "\n-- ASCII string: needle exists --\n"; 28 echo "\n-- ASCII string: needle doesn't exist --\n"; 31 echo "\n-- Multibyte string: needle exists --\n"; 37 echo "\n-- Multibyte string: needle doesn't exist --\n"; 45 -- ASCII string: needle exists -- 50 -- ASCII string: needle doesn't exist -- 53 -- Multibyte string: needle exists -- 58 -- Multibyte string: needle doesn't exist --
|
H A D | mb_strrichr_basic.phpt | 22 echo "\n-- ASCII string: needle exists --\n"; 28 echo "\n-- ASCII string: needle doesn't exist --\n"; 31 echo "\n-- Multibyte string: needle exists --\n"; 37 echo "\n-- Multibyte string: needle doesn't exist --\n"; 45 -- ASCII string: needle exists -- 50 -- ASCII string: needle doesn't exist -- 53 -- Multibyte string: needle exists -- 58 -- Multibyte string: needle doesn't exist --
|
H A D | mb_strrchr_basic.phpt | 15 echo "\n-- ASCII string: needle exists --\n"; 20 echo "\n-- ASCII string: needle doesn't exist --\n"; 23 echo "\n-- Multibyte string: needle exists --\n"; 29 echo "\n-- Multibyte string: needle doesn't exist --\n"; 41 -- ASCII string: needle exists -- 46 -- ASCII string: needle doesn't exist -- 49 -- Multibyte string: needle exists -- 54 -- Multibyte string: needle doesn't exist --
|
H A D | mb_substr_count.phpt | 11 print "== Empty needle should raise an error ==\n"; 23 // Although the needle below contains 3 bytes, it decodes to zero Unicode codepoints 24 // So the needle is actually 'empty', although it doesn't appear so 58 // cached data), and both of those codepoints matched a 1-codepoint needle 64 // needle, that match would be disregarded and not counted in the returned value 71 == Empty needle should raise an error == 72 mb_substr_count(): Argument #2 ($needle) must not be empty 73 mb_substr_count(): Argument #2 ($needle) must not be empty 74 mb_substr_count(): Argument #2 ($needle) must not be empty
|
H A D | mb_stripos_basic2.phpt | 48 foreach ($ascii_needles as $needle) { 50 var_dump(mb_stripos($haystack, $needle)); 51 var_dump(mb_stripos($haystack, $needle, 6)); 56 foreach ($greek_needles as $needle) { 58 var_dump(mb_stripos($haystack, $needle)); 59 var_dump(mb_stripos($haystack, $needle, 4));
|
H A D | mb_strripos_basic2.phpt | 48 foreach ($ascii_needles as $needle) { 50 var_dump(mb_strripos($haystack, $needle)); 51 var_dump(mb_strripos($haystack, $needle, 14)); 56 foreach ($greek_needles as $needle) { 58 var_dump(mb_strripos($haystack, $needle)); 59 var_dump(mb_strripos($haystack, $needle, 12));
|
/php-src/ext/standard/tests/strings/ |
H A D | bug60801.phpt | 6 $needle = "a\x00b"; 10 var_dump(strpbrk($haystack, $needle)); 11 var_dump(strpbrk('foobar', $needle)); 12 var_dump(strpbrk("\x00", $needle)); 13 var_dump(strpbrk('xyz', $needle));
|
H A D | strrchr_basic.phpt | 6 var_dump( strrchr("Hello, World", "H") ); //needle as single char 7 var_dump( strrchr("Hello, World", "H", true) ); //needle as single char 8 var_dump( strrchr("Hello, World", "Hello") ); //needle as a first word of haystack 9 var_dump( strrchr("Hello, World", "Hello", true) ); //needle as a first word of haystack 21 //needle as second word of haystack 27 //needle as special char 33 var_dump( strrchr("Hello, World", "Hello, World") ); //needle as haystack 34 var_dump( strrchr("Hello, World", "Hello, World", true) ); //needle as haystack 36 //needle string containing one existing and one non-existing char 40 //multiple existence of needle in haystack [all …]
|
H A D | strripos_basic1.phpt | 10 echo "\n-- regular string for haystack & needle --\n"; 17 echo "\n-- single char for needle --\n"; 21 echo "\n-- heredoc string for haystack & needle --\n"; 30 -- regular string for haystack & needle -- 37 -- single char for needle -- 41 -- heredoc string for haystack & needle --
|
H A D | strrpos_variation2.phpt | 2 Test strrpos() function : usage variations - single quoted strings for 'haystack' & 'needle' argume… 5 /* Test strrpos() function by passing single quoted strings to 'haystack' & 'needle' arguments */ 9 $needle = array( 55 42, //needle as int(ASCII value of '*') 56 $haystack //haystack as needle 59 /* loop through to get the position of the needle in haystack string */ 61 for($index=0; $index<count($needle); $index++) { 63 var_dump( strrpos($haystack, $needle[$index]) ); 64 var_dump( strrpos($haystack, $needle[$index], $index) );
|
H A D | stripos_variation2.phpt | 2 Test stripos() function : usage variations - single quoted strings for 'haystack' & 'needle' argume… 5 /* Test stripos() function by passing single quoted strings to 'haystack' & 'needle' arguments */ 9 $needle = array( 65 42, //needle as int(ASCII value of '*') 66 $haystack //haystack as needle 69 /* loop through to get the position of the needle in haystack string */ 71 for($index=0; $index<count($needle); $index++) { 73 var_dump( stripos($haystack, $needle[$index]) ); 74 var_dump( stripos($haystack, $needle[$index], $index) );
|
H A D | stristr_variation2.phpt | 2 Test stristr() function : usage variations - test values for $needle argument 6 echo "*** Testing stristr() function: with unexpected inputs for 'needle' argument ***\n"; 69 *** Testing stristr() function: with unexpected inputs for 'needle' argument *** 85 stristr(): Argument #2 ($needle) must be of type string, array given 87 stristr(): Argument #2 ($needle) must be of type string, array given 89 stristr(): Argument #2 ($needle) must be of type string, array given 101 stristr(): Argument #2 ($needle) must be of type string, resource given
|
H A D | strrchr_variation4.phpt | 26 $heredoc_needle, //needle as heredoc string 27 $special_chars_str //needle as haystack 30 //loop through to test strrchr() with each needle 31 foreach($needles as $needle) { 32 var_dump( strrchr($special_chars_str, $needle) );
|
H A D | strripos_variation2.phpt | 2 Test strripos() function : usage variations - single quoted strings for 'haystack' & 'needle' argum… 5 /* Test strripos() function by passing single quoted strings to 'haystack' & 'needle' arguments */ 55 42, //needle as int(ASCII value of '*') 56 $haystack //haystack as needle 59 /* loop through to get the position of the needle in haystack string */ 61 foreach ($needles as $needle) { 63 var_dump( strripos($haystack, $needle) ); 64 var_dump( strripos($haystack, $needle, 1) ); 65 var_dump( strripos($haystack, $needle, 20) ); 66 var_dump( strripos($haystack, $needle, -1) );
|
H A D | strripos_variation1.phpt | 2 Test strripos() function : usage variations - double quoted strings for 'haystack' & 'needle' argum… 5 /* Test strripos() function by passing double quoted strings for 'haystack' & 'needle' arguments */ 55 $haystack //haystack as needle 58 /* loop through to get the position of the needle in haystack string */ 60 foreach ($needles as $needle) { 62 var_dump( strripos($haystack, $needle) ); 63 var_dump( strripos($haystack, $needle, 1) ); 64 var_dump( strripos($haystack, $needle, 20) ); 65 var_dump( strripos($haystack, $needle, -1) );
|
H A D | strrchr_variation7.phpt | 21 $blank_line //needle as haystack 24 //loop through to test strrchr() with each needle 25 foreach($needles as $needle) { 26 var_dump( strrchr($blank_line, $needle) );
|
H A D | strrchr_variation5.phpt | 5 /* Prototype : string strrchr(string $haystack, string $needle); 25 $escape_char_str //needle as haystack 28 //loop through to test strrchr() with each needle 29 foreach($needles as $needle) { 30 var_dump( strrchr($escape_char_str, $needle) );
|
H A D | stripos_variation1.phpt | 2 Test stripos() function : usage variations - double quoted strings for 'haystack' & 'needle' argume… 5 /* Test stripos() function by passing double quoted strings for 'haystack' & 'needle' arguments */ 9 $needle = array( 64 $haystack //haystack as needle 67 /* loop through to get the position of the needle in haystack string */ 69 for($index=0; $index<count($needle); $index++) { 71 var_dump( stripos($haystack, $needle[$index]) ); 72 var_dump( stripos($haystack, $needle[$index], $index) );
|
H A D | strrchr_variation3.phpt | 20 $multi_line_str //needle as haystack 23 //loop through to test strrchr() with each needle 24 foreach($needles as $needle) { 25 var_dump( strrchr($multi_line_str, $needle) );
|
H A D | strrchr_variation6.phpt | 21 $quote_char_str //needle as haystack 24 //loop through to test strrchr() with each needle 25 foreach($needles as $needle) { 26 var_dump( strrchr($quote_char_str, $needle) );
|
H A D | stripos_basic1.phpt | 11 //regular string for haystack & needle 17 //single char for needle 21 //heredoc string for haystack & needle 26 //non-existing needle in haystack
|
/php-src/ext/intl/grapheme/ |
H A D | grapheme_string.c | 84 char *haystack, *needle; in PHP_FUNCTION() local 94 Z_PARAM_STRING(needle, needle_len) in PHP_FUNCTION() 137 char *haystack, *needle; in PHP_FUNCTION() local 147 Z_PARAM_STRING(needle, needle_len) in PHP_FUNCTION() 167 needle_dup = estrndup(needle, needle_len); in PHP_FUNCTION() 202 char *haystack, *needle; in PHP_FUNCTION() local 211 Z_PARAM_STRING(needle, needle_len) in PHP_FUNCTION() 260 char *haystack, *needle; in PHP_FUNCTION() local 269 Z_PARAM_STRING(needle, needle_len) in PHP_FUNCTION() 540 char *haystack, *needle; in strstr_common_handler() local [all …]
|