Home
last modified time | relevance | path

Searched refs:haystack (Results 1 – 25 of 200) sorted by relevance

12345678

/PHP-7.2/ext/intl/doc/
H A Dgrapheme_api.php31 * @param string $haystack The string to look in
38 function grapheme_strpos($haystack, $needle, $offset = 0) {} argument
43 * @param string $haystack The string to look in
50 function grapheme_stripos($haystack, $needle, $offset = 0) {} argument
55 * @param string $haystack The string to look in
62 function grapheme_strrpos($haystack, $needle, $offset = 0) {} argument
67 * @param string $haystack The string to look in
74 function grapheme_strripos($haystack, $needle, $offset = 0) {} argument
98 * @param string $haystack The input string.
109 * @param string $haystack The input string.
[all …]
/PHP-7.2/ext/standard/tests/strings/
H A Dstrrpos_variation8.phpt2 Test strrpos() function : usage variations - repetitive chars for 'haystack' 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 strings containing multiple occurrences of 'needle' in the 'haystack'
15 $haystack = "ababababAbaBa";
18 /* loop through to consider various offsets in getting the position of the needle in haystack strin…
20 for($offset = -1; $offset <= strlen($haystack); $offset++ ) {
22 var_dump( strrpos($haystack, $needle, $offset) );
H A Dstrrpos_negative_offset.phpt6 var_dump(strrpos("haystack", 'h', -8));
7 var_dump(strrpos("haystack", 'k', -1));
8 var_dump(strrpos("haystack", "ka", -1));
9 var_dump(strrpos("haystack", 'a', -3));
10 var_dump(strrpos("haystack", 'a', -4));
11 var_dump(@strrpos("haystack", 'h', -9));
H A Dbug60801.phpt5 $haystack = "foob\x00ar";
8 var_dump(strpbrk($haystack, 'ar'));
9 var_dump(strpbrk($haystack, "\x00"));
10 var_dump(strpbrk($haystack, $needle));
14 var_dump(strpbrk($haystack, 'xyz'));
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 */
13 $haystack = "Hello,\t\n\0\n $&!#%()*<=>?@hello123456he \x234 \101 ";
62 $haystack //haystack as needle
65 /* loop through to get the position of the needle in haystack string */
69 var_dump( strripos($haystack, $needle) );
70 var_dump( strripos($haystack, $needle, 1) );
71 var_dump( strripos($haystack, $needle, 20) );
[all …]
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 */
13 $haystack = "Hello,\t\n\0\n $&!#%()*<=>?@hello123456he \x234 \101 ";
62 $haystack //haystack as needle
65 /* loop through to get the position of the needle in haystack string */
69 var_dump( strrpos($haystack, $needle[$index]) );
70 var_dump( strrpos($haystack, $needle[$index], $index) );
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 */
13 $haystack = 'Hello,\t\n\0\n $&!#%()*<=>?@hello123456he \x234 \101 ';
63 $haystack //haystack as needle
66 /* loop through to get the position of the needle in haystack string */
70 var_dump( strrpos($haystack, $needle[$index]) );
71 var_dump( strrpos($haystack, $needle[$index], $index) );
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";
26 echo "\n-- heredoc string for haystack & needle --\n";
36 -- regular string for haystack & needle --
47 -- heredoc string for haystack & needle --
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'
10 /* Test strripos() function by passing single quoted strings to 'haystack' & 'needle' arguments */
13 $haystack = 'Hello,\t\n\0\n $&!#%()*<=>?@hello123456he \x234 \101 ';
63 $haystack //haystack as needle
66 /* loop through to get the position of the needle in haystack string */
70 var_dump( strripos($haystack, $needle) );
71 var_dump( strripos($haystack, $needle, 1) );
72 var_dump( strripos($haystack, $needle, 20) );
[all …]
H A Dstrrpos_variation13.phpt5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] );
6 * Description: Find position of last occurrence of 'needle' in 'haystack'.
15 $haystack = "\0Hello\0World\0";
28 var_dump( strrpos($haystack, $needles[$index]) );
29 var_dump( strrpos($haystack, $needles[$index], $index) );
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 */
13 $haystack = 'Hello,\t\n\0\n $&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 ';
73 $haystack //haystack as needle
76 /* loop through to get the position of the needle in haystack string */
80 var_dump( stripos($haystack, $needle[$index]) );
81 var_dump( stripos($haystack, $needle[$index], $index) );
H A Dstripos_variation1.phpt2 Test stripos() function : usage variations - double quoted strings for 'haystack' & 'needle' argume…
5 /* Prototype : int stripos ( string $haystack, string $needle [, int $offset] );
10 /* Test stripos() function by passing double quoted strings for 'haystack' & 'needle' arguments */
13 $haystack = "Hello,\t\n\0\n $&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 ";
71 $haystack //haystack as needle
74 /* loop through to get the position of the needle in haystack string */
78 var_dump( stripos($haystack, $needle[$index]) );
79 var_dump( stripos($haystack, $needle[$index], $index) );
H A Dstrrchr_basic.phpt5 /* Prototype : string strrchr(string $haystack, string $needle);
12 var_dump( strrchr("Hello, World", "Hello") ); //needle as a first word of haystack
20 //needle as second word of haystack
28 var_dump( strrchr("Hello, World", "Hello, World") ); //needle as haystack
33 //multiple existence of needle in haystack
37 var_dump( strrchr("Hello, World", "Zzzz") ); //non-existent needle in haystack
H A Dstrripos_basic2.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, with various offsets --\n";
21 echo "\n-- heredoc string for haystack & needle, with various offsets --\n";
42 -- regular string for haystack & needle, with various offsets --
48 -- heredoc string for haystack & needle, with various offsets --
H A Dstrrchr_variation8.phpt2 Test strrchr() function : usage variations - empty heredoc string for 'haystack'
5 /* Prototype : string strrchr(string $haystack, string $needle);
10 /* Test strrchr() function by passing empty heredoc string for haystack
24 $empty_str //needle as haystack
H A Dstrrpos_variation7.phpt2 Test strrpos() function : usage variations - empty heredoc string for 'haystack' 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 by passing empty heredoc string for haystack
H A Dstrpbrk_error.phpt5 /* Prototype : array strpbrk(string haystack, string char_list)
13 $haystack = 'This is a Simple text.';
18 var_dump( strpbrk($haystack, $char_list, $extra_arg) );
21 var_dump( strpbrk($haystack) );
24 var_dump( strpbrk($haystack, '') );
27 var_dump( strpbrk($haystack, array('a', 'b', 'c') ) );
H A Dstrrchr_variation7.phpt2 Test strrchr() function : usage variations - heredoc string containing blank line for 'haystack'
5 /* Prototype : string strrchr(string $haystack, string $needle);
11 * blank-line for haystack and with various needles
26 $blank_line //needle as haystack
H A Dstrrpos_variation5.phpt2 Test strrpos() function : usage variations - heredoc string containing escape chars for 'haystack' …
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 heredoc string containing escape chars for haystack
/PHP-7.2/ext/intl/tests/
H A Dbug61860.phpt7 $haystack = 'Auf der Straße nach Paris habe ich mit dem Fahrer gesprochen';
9 grapheme_stripos($haystack, 'pariS '),
10 grapheme_stristr($haystack, 'paRis '),
11 grapheme_substr($haystack, grapheme_stripos($haystack, 'Paris'))
/PHP-7.2/ext/intl/grapheme/
H A Dgrapheme_string.c109 char *haystack, *needle; in PHP_FUNCTION() local
143 found = php_memnstr(haystack + noffset, needle, needle_len, haystack + haystack_len); in PHP_FUNCTION()
152 RETURN_LONG(found - haystack); in PHP_FUNCTION()
207 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION()
241 char *haystack, *needle; in PHP_FUNCTION() local
304 char *haystack, *needle; in PHP_FUNCTION() local
592 char *haystack, *needle; in strstr_common_handler() local
619 found = php_memnstr(haystack, needle, needle_len, haystack + haystack_len); in strstr_common_handler()
628 size_t found_offset = found - haystack; in strstr_common_handler()
631 RETURN_STRINGL(haystack, found_offset); in strstr_common_handler()
[all …]
/PHP-7.2/ext/mbstring/tests/
H A Dmb_stripos_basic2.phpt10 /* Prototype : int mb_stripos(string haystack, string needle [, int offset [, string encoding]])
58 foreach ($ascii_haystacks as $haystack) {
59 var_dump(mb_stripos($haystack, $needle));
60 var_dump(mb_stripos($haystack, $needle, 6));
66 foreach ($greek_haystacks as $haystack) {
67 var_dump(mb_stripos($haystack, $needle));
68 var_dump(mb_stripos($haystack, $needle, 4));
H A Dmb_strripos_basic2.phpt10 /* Prototype : int mb_strripos(string haystack, string needle [, int offset [, string encoding]])
58 foreach ($ascii_haystacks as $haystack) {
59 var_dump(mb_strripos($haystack, $needle));
60 var_dump(mb_strripos($haystack, $needle, 14));
66 foreach ($greek_haystacks as $haystack) {
67 var_dump(mb_strripos($haystack, $needle));
68 var_dump(mb_strripos($haystack, $needle, 12));
H A Dmb_strripos_variation5_Bug45923.phpt10 /* Prototype : int mb_strripos(string haystack, string needle [, int offset [, string encoding]])
77 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
81 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
87 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
91 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
97 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
101 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
107 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
111 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
/PHP-7.2/ext/standard/tests/array/
H A Darray_search_variation2.phpt2 Test array_search() function : usage variations - different haystack values
6 * Prototype : mixed array_search ( mixed $needle, array $haystack [, bool $strict] )
7 …* Description: Searches haystack for needle and returns the key if it is found in the array, FALSE…
11 /* Test array_search() with different possible haystack values */
13 echo "*** Testing array_search() with different haystack values ***\n";
53 *** Testing array_search() with different haystack values ***

Completed in 77 milliseconds

12345678