Home
last modified time | relevance | path

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

12345678

/PHP-5.6/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-5.6/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 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 Dstrrpos_offset.phpt18 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
21 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
24 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
27 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
30 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
33 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
36 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
39 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
H A Dstrripos_offset.phpt19 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
22 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
25 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
28 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
34 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
37 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
40 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
43 Warning: strripos(): Offset is greater than the length of haystack string in %s on line %d
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 Dstrrpos_variation15.phpt2 Test strrpos() function : usage variations - unexpected inputs for 'haystack', 'needle' & 'offset' …
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 'haystack', 'needle' & 'offset' arguments */
12 echo "*** Testing strrpos() function: with unexpected values for haystack, needle & offset ***\n";
90 *** Testing strrpos() function: with unexpected values for haystack, needle & offset ***
97 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
101 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
105 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
109 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
[all …]
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
/PHP-5.6/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-5.6/ext/intl/grapheme/
H A Dgrapheme_string.c111 unsigned char *haystack, *needle; in PHP_FUNCTION() local
150 …ound = (unsigned char *)php_memnstr((char *)haystack + noffset, (char *)needle, needle_len, (char … in PHP_FUNCTION()
158 if ( grapheme_ascii_check(haystack, haystack_len) >= 0 ) { in PHP_FUNCTION()
160 RETURN_LONG(found - haystack); in PHP_FUNCTION()
255 unsigned char *haystack, *needle; in PHP_FUNCTION() local
325 unsigned char *haystack, *needle; in PHP_FUNCTION() local
617 unsigned char *haystack, *needle, *found; in strstr_common_handler() local
643 …found = (unsigned char *)php_memnstr((char *)haystack, (char *)needle, needle_len, (char *)haystac… in strstr_common_handler()
652 size_t found_offset = found - haystack; in strstr_common_handler()
673 U8_FWD_N(haystack, ret_pos, haystack_len, uchar_pos); in strstr_common_handler()
[all …]
/PHP-5.6/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_variation5_Bug45923.phpt10 /* Prototype : int mb_strripos(string haystack, string needle [, int offset [, string encoding]])
78 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
82 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
88 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
92 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
98 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
102 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
108 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
112 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
/PHP-5.6/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 73 milliseconds

12345678