Home
last modified time | relevance | path

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

12345678

/PHP-5.5/ext/intl/doc/
H A Dgrapheme_api.php32 * @param string $needle The string to look for
38 function grapheme_strpos($haystack, $needle, $offset = 0) {} argument
44 * @param string $needle The string to look for
50 function grapheme_stripos($haystack, $needle, $offset = 0) {} argument
56 * @param string $needle The string to look for
62 function grapheme_strrpos($haystack, $needle, $offset = 0) {} argument
68 * @param string $needle The string to look for
74 function grapheme_strripos($haystack, $needle, $offset = 0) {} argument
99 * @param string $needle The string to look for.
104 function grapheme_strstr($haystack, $needle, $before_needle = FALSE) {} argument
[all …]
/PHP-5.5/ext/mbstring/tests/
H A Dmb_stripos_basic.phpt74 echo "\n -- ASCII Strings, needle should be found --\n";
75 foreach ($ascii_needles as $needle) {
76 if ($needle == '!') {
81 var_dump(mb_stripos($haystack, $needle));
87 foreach ($greek_needles as $needle) {
88 if ($needle == '!') {
93 var_dump(mb_stripos($haystack, $needle));
103 -- ASCII Strings, needle should be found --
117 -- ASCII Strings, needle should not be found --
131 -- Greek Strings, needle should be found --
[all …]
H A Dmb_strripos_basic.phpt74 echo "\n -- ASCII Strings, needle should be found --\n";
75 foreach ($ascii_needles as $needle) {
76 if ($needle == '!') {
81 var_dump(mb_strripos($haystack, $needle));
87 foreach ($greek_needles as $needle) {
88 if ($needle == '!') {
93 var_dump(mb_strripos($haystack, $needle));
103 -- ASCII Strings, needle should be found --
117 -- ASCII Strings, needle should not be found --
131 -- Greek Strings, needle should be found --
[all …]
H A Dmb_strstr_basic.phpt10 /* Prototype : string mb_strstr(string haystack, string needle[, bool part[, string encoding]])
24 echo "\n-- ASCII string: needle exists --\n";
30 echo "\n-- ASCII string: needle doesn't exist --\n";
33 echo "\n-- Multibyte string: needle exists --\n";
40 echo "\n-- Multibyte string: needle doesn't exist --\n";
49 -- ASCII string: needle exists --
54 -- ASCII string: needle doesn't exist --
57 -- Multibyte string: needle exists --
62 -- Multibyte string: needle doesn't exist --
H A Dmb_strrchr_basic.phpt10 /* Prototype : string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])
24 echo "\n-- ASCII string: needle exists --\n";
30 echo "\n-- ASCII string: needle doesn't exist --\n";
33 echo "\n-- Multibyte string: needle exists --\n";
40 echo "\n-- Multibyte string: needle doesn't exist --\n";
49 -- ASCII string: needle exists --
54 -- ASCII string: needle doesn't exist --
57 -- Multibyte string: needle exists --
62 -- Multibyte string: needle doesn't exist --
H A Dmb_stristr_basic.phpt10 /* Prototype : string mb_stristr(string haystack, string needle[, bool part[, string encoding]])
31 echo "\n-- ASCII string: needle exists --\n";
37 echo "\n-- ASCII string: needle doesn't exist --\n";
40 echo "\n-- Multibyte string: needle exists --\n";
46 echo "\n-- Multibyte string: needle doesn't exist --\n";
55 -- ASCII string: needle exists --
60 -- ASCII string: needle doesn't exist --
63 -- Multibyte string: needle exists --
68 -- Multibyte string: needle doesn't exist --
H A Dmb_strrichr_basic.phpt10 /* Prototype : string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])
31 echo "\n-- ASCII string: needle exists --\n";
37 echo "\n-- ASCII string: needle doesn't exist --\n";
40 echo "\n-- Multibyte string: needle exists --\n";
46 echo "\n-- Multibyte string: needle doesn't exist --\n";
55 -- ASCII string: needle exists --
60 -- ASCII string: needle doesn't exist --
63 -- Multibyte string: needle exists --
68 -- Multibyte string: needle doesn't exist --
/PHP-5.5/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 Dstrripos_basic1.phpt5 /* Prototype : int strripos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of a case-insensitive 'needle' in a 'haystack'
15 echo "\n-- regular string for haystack & needle --\n";
22 echo "\n-- single char for needle --\n";
26 echo "\n-- heredoc string for haystack & needle --\n";
36 -- regular string for haystack & needle --
43 -- single char for needle --
47 -- heredoc string for haystack & needle --
H A Dstrrchr_basic.phpt5 /* Prototype : string strrchr(string $haystack, string $needle);
11 var_dump( strrchr("Hello, World", "H") ); //needle as single char
12 var_dump( strrchr("Hello, World", "Hello") ); //needle as a first word of haystack
20 //needle as second word of haystack
24 //needle as special char
28 var_dump( strrchr("Hello, World", "Hello, World") ); //needle as haystack
30 //needle string containing one existing and one non-existing char
33 //multiple existence of needle in haystack
37 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 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of 'needle' in 'haystack'.
10 /* Test strrpos() function with unexpected inputs for 'needle' and
14 echo "*** Testing strrpos() function with unexpected values for needle ***\n";
95 *** Testing strrpos() function with unexpected values for needle ***
116 Warning: strrpos(): needle is not a string or an integer in %s on line %d
120 Warning: strrpos(): needle is not a string or an integer in %s on line %d
124 Warning: strrpos(): needle is not a string or an integer in %s on line %d
128 Warning: strrpos(): needle is not a string or an integer in %s on line %d
[all …]
H A Dstrrpos_variation2.phpt2 Test strrpos() function : usage variations - single quoted strings for 'haystack' & 'needle' argume…
5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of 'needle' in 'haystack'.
10 /* Test strrpos() function by passing single quoted strings to 'haystack' & 'needle' arguments */
14 $needle = array(
62 42, //needle as int(ASCII value of '*')
63 $haystack //haystack as needle
66 /* loop through to get the position of the needle in haystack string */
68 for($index=0; $index<count($needle); $index++) {
70 var_dump( strrpos($haystack, $needle[$index]) );
[all …]
H A Dstristr_error.phpt6 /* Prototype: string stristr ( string $haystack , mixed $needle [, bool $before_needle ] )
15 echo "\n-- Testing stristr() function with no needle --\n";
16 var_dump( stristr("Hello World") ); // without "needle"
25 echo "\n-- Testing stristr() function with empty needle --\n";
41 -- Testing stristr() function with no needle --
53 Warning: stristr(): Empty needle in %s on line %d
56 -- Testing stristr() function with empty needle --
58 Warning: stristr(): Empty needle in %s on line %d
H A Dstripos_variation10.phpt2 Test stripos() function : usage variations - unexpected inputs for 'needle' argument
5 /* Prototype : int stripos ( string $haystack, string $needle [, int $offset] );
10 /* Test stripos() function with unexpected inputs for 'needle' and
14 echo "*** Testing stripos() function with unexpected values for needle ***\n";
95 *** Testing stripos() function with unexpected values for needle ***
126 Warning: stripos(): needle is not a string or an integer in %s on line %d
131 Warning: stripos(): needle is not a string or an integer in %s on line %d
136 Warning: stripos(): needle is not a string or an integer in %s on line %d
141 Warning: stripos(): needle is not a string or an integer in %s on line %d
146 Warning: stripos(): needle is not a string or an integer in %s on line %d
[all …]
H A Dstrrpos_variation8.phpt5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of 'needle' in 'haystack'.
10 /* Test strrpos() function with strings containing multiple occurrences of 'needle' in the 'haystac…
16 $needle = "aba";
18 /* loop through to consider various offsets in getting the position of the needle in haystack strin…
22 var_dump( strrpos($haystack, $needle, $offset) );
H A Dstrrchr_variation4.phpt5 /* Prototype : string strrchr(string $haystack, string $needle);
31 $heredoc_needle, //needle as heredoc string
32 $special_chars_str //needle as haystack
35 //loop through to test strrchr() with each needle
36 foreach($needles as $needle) {
37 var_dump( strrchr($special_chars_str, $needle) );
H A Dstrrchr_variation8.phpt5 /* Prototype : string strrchr(string $haystack, string $needle);
24 $empty_str //needle as haystack
27 //loop through to test strrchr() with each needle
28 foreach($needles as $needle) {
29 var_dump( strrchr($empty_str, $needle) );
H A Dstripos_variation2.phpt2 Test stripos() function : usage variations - single quoted strings for 'haystack' & 'needle' argume…
5 /* Prototype : int stripos ( string $haystack, string $needle [, int $offset] );
10 /* Test stripos() function by passing single quoted strings to 'haystack' & 'needle' arguments */
14 $needle = array(
72 42, //needle as int(ASCII value of '*')
73 $haystack //haystack as needle
76 /* loop through to get the position of the needle in haystack string */
78 for($index=0; $index<count($needle); $index++) {
80 var_dump( stripos($haystack, $needle[$index]) );
81 var_dump( stripos($haystack, $needle[$index], $index) );
H A Dstrrpos_variation1.phpt2 Test strrpos() function : usage variations - double quoted strings for 'haystack' & 'needle' argume…
5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of 'needle' in 'haystack'.
10 /* Test strrpos() function by passing double quoted strings for 'haystack' & 'needle' arguments */
14 $needle = array(
62 $haystack //haystack as needle
65 /* loop through to get the position of the needle in haystack string */
67 for($index=0; $index<count($needle); $index++) {
69 var_dump( strrpos($haystack, $needle[$index]) );
70 var_dump( strrpos($haystack, $needle[$index], $index) );
H A Dstrripos_variation2.phpt2 Test strripos() function : usage variations - single quoted strings for 'haystack' & 'needle' argum…
5 /* Prototype : int strripos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of a case-insensitive 'needle' in a 'haystack'
62 42, //needle as int(ASCII value of '*')
63 $haystack //haystack as needle
66 /* loop through to get the position of the needle in haystack string */
68 foreach ($needles as $needle) {
70 var_dump( strripos($haystack, $needle) );
71 var_dump( strripos($haystack, $needle, 1) );
72 var_dump( strripos($haystack, $needle, 20) );
[all …]
H A Dstrrchr_variation7.phpt5 /* Prototype : string strrchr(string $haystack, string $needle);
26 $blank_line //needle as haystack
29 //loop through to test strrchr() with each needle
30 foreach($needles as $needle) {
31 var_dump( strrchr($blank_line, $needle) );
H A Dstrripos_variation1.phpt2 Test strripos() function : usage variations - double quoted strings for 'haystack' & 'needle' argum…
5 /* Prototype : int strripos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of a case-insensitive 'needle' in a 'haystack'
10 /* Test strripos() function by passing double quoted strings for 'haystack' & 'needle' arguments */
62 $haystack //haystack as needle
65 /* loop through to get the position of the needle in haystack string */
67 foreach ($needles as $needle) {
69 var_dump( strripos($haystack, $needle) );
70 var_dump( strripos($haystack, $needle, 1) );
71 var_dump( strripos($haystack, $needle, 20) );
[all …]
H A Dstrrchr_variation10.phpt2 Test strrchr() function : usage variations - unexpected inputs for needle
5 /* Prototype : string strrchr(string $haystack, string $needle);
10 /* Test strrchr() function: with unexpected inputs for needle
14 echo "*** Testing strrchr() function with unexpected inputs for needle ***\n";
133 *** Testing strrchr() function with unexpected inputs for needle ***
154 Warning: strrchr(): needle is not a string or an integer in %s on line %d
158 Warning: strrchr(): needle is not a string or an integer in %s on line %d
162 Warning: strrchr(): needle is not a string or an integer in %s on line %d
166 Warning: strrchr(): needle is not a string or an integer in %s on line %d
170 Warning: strrchr(): needle is not a string or an integer in %s on line %d
[all …]
H A Dstrrchr_variation3.phpt5 /* Prototype : string strrchr(string $haystack, string $needle);
25 $multi_line_str //needle as haystack
28 //loop through to test strrchr() with each needle
29 foreach($needles as $needle) {
30 var_dump( strrchr($multi_line_str, $needle) );
H A Dstrrpos_basic1.phpt5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of 'needle' in 'haystack'
16 //regular string for haystack & needle
22 //single char for needle
26 //heredoc string for haystack & needle

Completed in 49 milliseconds

12345678