Home
last modified time | relevance | path

Searched refs:needle (Results 1 – 25 of 115) sorted by relevance

12345

/PHP-8.0/ext/standard/tests/strings/
H A Dbug60801.phpt6 $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 Dstrrchr_basic.phpt6 var_dump( strrchr("Hello, World", "H") ); //needle as single char
7 var_dump( strrchr("Hello, World", "Hello") ); //needle as a first word of haystack
15 //needle as second word of haystack
19 //needle as special char
23 var_dump( strrchr("Hello, World", "Hello, World") ); //needle as haystack
25 //needle string containing one existing and one non-existing char
28 //multiple existence of needle in haystack
32 var_dump( strrchr("Hello, World", "Zzzz") ); //non-existent needle in haystack
H A Dstrrpos_variation10.phpt2 Test strrpos() function : usage variations - unexpected inputs for 'needle' argument
5 /* Test strrpos() function with unexpected inputs for 'needle' and
9 echo "*** Testing strrpos() function with unexpected values for needle ***\n";
77 // loop through each element of the 'needle' array to check the working of strrpos()
94 *** Testing strrpos() function with unexpected values for needle ***
114 strrpos(): Argument #2 ($needle) must be of type string, array given
116 strrpos(): Argument #2 ($needle) must be of type string, array given
118 strrpos(): Argument #2 ($needle) must be of type string, array given
120 strrpos(): Argument #2 ($needle) must be of type string, array given
122 strrpos(): Argument #2 ($needle) must be of type string, array given
[all …]
H A Dstripos_variation10.phpt2 Test stripos() function : usage variations - unexpected inputs for 'needle' argument
5 /* Test stripos() function with unexpected inputs for 'needle' and
9 echo "*** Testing stripos() function with unexpected values for needle ***\n";
77 // loop through each element of the 'needle' array to check the working of stripos()
94 *** Testing stripos() function with unexpected values for needle ***
124 stripos(): Argument #2 ($needle) must be of type string, array given
127 stripos(): Argument #2 ($needle) must be of type string, array given
130 stripos(): Argument #2 ($needle) must be of type string, array given
133 stripos(): Argument #2 ($needle) must be of type string, array given
136 stripos(): Argument #2 ($needle) must be of type string, array given
[all …]
H A Dstrripos_basic1.phpt10 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 Dstrrchr_variation10.phpt2 Test strrchr() function : usage variations - unexpected inputs for needle
5 /* Test strrchr() function: with unexpected inputs for needle
9 echo "*** Testing strrchr() function with unexpected inputs for needle ***\n";
132 *** Testing strrchr() function with unexpected inputs for needle ***
152 strrchr(): Argument #2 ($needle) must be of type string, array given
154 strrchr(): Argument #2 ($needle) must be of type string, array given
156 strrchr(): Argument #2 ($needle) must be of type string, array given
158 strrchr(): Argument #2 ($needle) must be of type string, array given
160 strrchr(): Argument #2 ($needle) must be of type string, array given
180 strrchr(): Argument #2 ($needle) must be of type string, resource given
H A Dstripos_variation2.phpt2 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(
67 42, //needle as int(ASCII value of '*')
68 $haystack //haystack as needle
71 /* loop through to get the position of the needle in haystack string */
73 for($index=0; $index<count($needle); $index++) {
75 var_dump( stripos($haystack, $needle[$index]) );
76 var_dump( stripos($haystack, $needle[$index], $index) );
H A Dstrrpos_variation2.phpt2 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(
57 42, //needle as int(ASCII value of '*')
58 $haystack //haystack as needle
61 /* loop through to get the position of the needle in haystack string */
63 for($index=0; $index<count($needle); $index++) {
65 var_dump( strrpos($haystack, $needle[$index]) );
66 var_dump( strrpos($haystack, $needle[$index], $index) );
H A Dstrrchr_variation4.phpt26 $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 Dstrrchr_variation8.phpt19 $empty_str //needle as haystack
22 //loop through to test strrchr() with each needle
23 foreach($needles as $needle) {
24 var_dump( strrchr($empty_str, $needle) );
H A Dstrrchr_variation7.phpt21 $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 Dstrripos_variation2.phpt2 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 */
57 42, //needle as int(ASCII value of '*')
58 $haystack //haystack as needle
61 /* loop through to get the position of the needle in haystack string */
63 foreach ($needles as $needle) {
65 var_dump( strripos($haystack, $needle) );
66 var_dump( strripos($haystack, $needle, 1) );
67 var_dump( strripos($haystack, $needle, 20) );
68 var_dump( strripos($haystack, $needle, -1) );
H A Dstrrchr_variation5.phpt5 /* 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 Dstrrchr_variation3.phpt20 $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 Dstristr_variation2.phpt2 Test stristr() function : usage variations - test values for $needle argument
6 echo "*** Testing stristr() function: with unexpected inputs for 'needle' argument ***\n";
83 *** Testing stristr() function: with unexpected inputs for 'needle' argument ***
99 stristr(): Argument #2 ($needle) must be of type string, array given
101 stristr(): Argument #2 ($needle) must be of type string, array given
103 stristr(): Argument #2 ($needle) must be of type string, array given
119 stristr(): Argument #2 ($needle) must be of type string, resource given
H A Dstrrpos_variation1.phpt2 Test strrpos() function : usage variations - double quoted strings for 'haystack' & 'needle' argume…
5 /* Test strrpos() function by passing double quoted strings for 'haystack' & 'needle' arguments */
9 $needle = array(
57 $haystack //haystack as needle
60 /* loop through to get the position of the needle in haystack string */
62 for($index=0; $index<count($needle); $index++) {
64 var_dump( strrpos($haystack, $needle[$index]) );
65 var_dump( strrpos($haystack, $needle[$index], $index) );
H A Dstrrchr_variation6.phpt21 $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 Dstrripos_variation1.phpt2 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 */
57 $haystack //haystack as needle
60 /* loop through to get the position of the needle in haystack string */
62 foreach ($needles as $needle) {
64 var_dump( strripos($haystack, $needle) );
65 var_dump( strripos($haystack, $needle, 1) );
66 var_dump( strripos($haystack, $needle, 20) );
67 var_dump( strripos($haystack, $needle, -1) );
/PHP-8.0/ext/mbstring/tests/
H A Dmb_stripos_basic.phpt68 echo "\n -- ASCII Strings, needle should be found --\n";
69 foreach ($ascii_needles as $needle) {
70 if ($needle == '!') {
75 var_dump(mb_stripos($haystack, $needle));
81 foreach ($greek_needles as $needle) {
82 if ($needle == '!') {
87 var_dump(mb_stripos($haystack, $needle));
97 -- ASCII Strings, needle should be found --
111 -- ASCII Strings, needle should not be found --
125 -- Greek Strings, needle should be found --
[all …]
H A Dmb_strripos_basic.phpt68 echo "\n -- ASCII Strings, needle should be found --\n";
69 foreach ($ascii_needles as $needle) {
70 if ($needle == '!') {
75 var_dump(mb_strripos($haystack, $needle));
81 foreach ($greek_needles as $needle) {
82 if ($needle == '!') {
87 var_dump(mb_strripos($haystack, $needle));
97 -- ASCII Strings, needle should be found --
111 -- ASCII Strings, needle should not be found --
125 -- Greek Strings, needle should be found --
[all …]
H A Dmb_strrchr_basic.phpt18 echo "\n-- ASCII string: needle exists --\n";
24 echo "\n-- ASCII string: needle doesn't exist --\n";
27 echo "\n-- Multibyte string: needle exists --\n";
34 echo "\n-- Multibyte string: needle doesn't exist --\n";
42 -- ASCII string: needle exists --
47 -- ASCII string: needle doesn't exist --
50 -- Multibyte string: needle exists --
55 -- Multibyte string: needle doesn't exist --
H A Dmb_strstr_basic.phpt18 echo "\n-- ASCII string: needle exists --\n";
24 echo "\n-- ASCII string: needle doesn't exist --\n";
27 echo "\n-- Multibyte string: needle exists --\n";
34 echo "\n-- Multibyte string: needle doesn't exist --\n";
42 -- ASCII string: needle exists --
47 -- ASCII string: needle doesn't exist --
50 -- Multibyte string: needle exists --
55 -- Multibyte string: needle doesn't exist --
H A Dmb_stristr_basic.phpt25 echo "\n-- ASCII string: needle exists --\n";
31 echo "\n-- ASCII string: needle doesn't exist --\n";
34 echo "\n-- Multibyte string: needle exists --\n";
40 echo "\n-- Multibyte string: needle doesn't exist --\n";
48 -- ASCII string: needle exists --
53 -- ASCII string: needle doesn't exist --
56 -- Multibyte string: needle exists --
61 -- Multibyte string: needle doesn't exist --
H A Dmb_strrichr_basic.phpt25 echo "\n-- ASCII string: needle exists --\n";
31 echo "\n-- ASCII string: needle doesn't exist --\n";
34 echo "\n-- Multibyte string: needle exists --\n";
40 echo "\n-- Multibyte string: needle doesn't exist --\n";
48 -- ASCII string: needle exists --
53 -- ASCII string: needle doesn't exist --
56 -- Multibyte string: needle exists --
61 -- Multibyte string: needle doesn't exist --
/PHP-8.0/ext/intl/grapheme/
H A Dgrapheme_string.c104 char *haystack, *needle; in PHP_FUNCTION() local
154 char *haystack, *needle; in PHP_FUNCTION() local
181 needle_dup = estrndup(needle, needle_len); in PHP_FUNCTION()
196 if ( grapheme_ascii_check((unsigned char *)needle, needle_len) >= 0 ) { in PHP_FUNCTION()
216 char *haystack, *needle; in PHP_FUNCTION() local
249 if ( grapheme_ascii_check((unsigned char *)needle, needle_len) >= 0 ) { in PHP_FUNCTION()
271 char *haystack, *needle; in PHP_FUNCTION() local
297 needle_dup = estrndup(needle, needle_len); in PHP_FUNCTION()
313 if ( grapheme_ascii_check((unsigned char *)needle, needle_len) >= 0 ) { in PHP_FUNCTION()
545 char *haystack, *needle; in strstr_common_handler() local
[all …]

Completed in 36 milliseconds

12345