Home
last modified time | relevance | path

Searched refs:needle (Results 26 – 50 of 107) sorted by relevance

12345

/php-src/ext/standard/tests/strings/
H A Dstrrchr_variation2.phpt5 /* Test strrchr() function by passing various single quoted strings to 'haystack' & 'needle' */
9 $needle = array(
64 42, //needle as int(ASCII value of '*')
65 $haystack //haystack as needle
68 /* loop through to get the position of the needle in haystack string */
70 for($index=0; $index<count($needle); $index++) {
72 var_dump( strrchr($haystack, $needle[$index]) );
H A Dstrrpos_variation8.phpt5 /* Test strrpos() function with strings containing multiple occurrences of 'needle' in the 'haystac…
11 $needle = "aba";
13 /* loop through to consider various offsets in getting the position of the needle in haystack strin…
17 var_dump( strrpos($haystack, $needle, $offset) );
H A Dstrrchr_variation1.phpt6 /* Test strrchr() function by passing various double quoted strings for 'haystack' & 'needle' */
10 $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( strrchr($haystack, $needle[$index]) );
H A Dstrstr.phpt24 /* needles in an array to get the string starts with needle, in $string */
57 /* loop through to get the string starts with "needle" in $string */
66 echo "-- Passing objects as string and needle --\n";
79 class needle
85 $obj_needle = new needle;
120 $needle = 'world';
123 var_dump( strstr("Hello, world", "$needle") ); // works
124 var_dump( strstr("Hello, world'S", "$needle'S") ); // works
128 var_dump( strstr("Hello, worldS", "${needle}S") ); // works
129 var_dump( strstr("Hello, worldS", "{$needle}S") ); // works
[all …]
H A Dstrpos.phpt60 /* loop through to get the "needle" position in $string */
81 /* loop through to get the "needle" position in $string */
94 echo "-- Passing objects as string and needle --\n";
107 class needle
113 $obj_needle = new needle;
149 $needle = 'world';
152 var_dump( strpos("Hello, world", "$needle") ); // works
153 var_dump( strpos("Hello, world'S", "$needle'S") ); // works
157 var_dump( strpos("Hello, worldS", "${needle}S") ); // works
158 var_dump( strpos("Hello, worldS", "{$needle}S") ); // works
[all …]
H A Dstrripos_basic2.phpt10 echo "\n-- regular string for haystack & needle, with various offsets --\n";
16 echo "\n-- heredoc string for haystack & needle, with various offsets --\n";
36 -- regular string for haystack & needle, with various offsets --
42 -- heredoc string for haystack & needle, with various offsets --
H A Dstrrpos_basic1.phpt11 //regular string for haystack & needle
17 //single char for needle
21 //heredoc string for haystack & needle
/php-src/ext/mbstring/tests/
H A Dmb_strrchr_variation6.phpt24 // needle should be found
26 // no needle should be found
31 // needle should be found
39 // no needle should be found
H A Dmb_strstr_variation6.phpt24 // needle should be found
26 // no needle should be found
31 // needle should be found
39 // no needle should be found
H A Dmb_substr_count_variation4.phpt2 Test mb_substr_count() function : variation - pass a $needle that overlaps in $haystack
8 * Pass mb_substr_count() a $needle that overlaps in $haystack and see whether
18 var_dump(mb_substr_count($string_ascii, 'abcabc')); //needle overlaps in haystack
H A Dmb_stristr_variation5.phpt23 echo "\n-- ASCII string: needle exists --\n";
32 echo "\n-- Multibyte string: needle exists --\n";
44 -- ASCII string: needle exists --
52 -- Multibyte string: needle exists --
H A Dmb_strrichr_variation5.phpt23 echo "\n-- ASCII string: needle exists --\n";
32 echo "\n-- Multibyte string: needle exists --\n";
44 -- ASCII string: needle exists --
52 -- Multibyte string: needle exists --
H A Dmb_stripos_error2.phpt13 $needle = 'world';
18 var_dump( mb_stripos($haystack, $needle, $offset, $encoding) );
H A Dmb_strpos_error2.phpt13 $needle = 'world';
18 var_dump( mb_strpos($haystack, $needle, $offset, $encoding) );
H A Dmb_strripos_error2.phpt13 $needle = 'world';
18 var_dump( mb_strripos($haystack, $needle, $offset, $encoding) );
H A Dmb_stristr_error2.phpt12 $needle = 'world';
17 var_dump( mb_stristr($haystack, $needle, $part, $encoding) );
H A Dmb_strrchr_error2.phpt12 $needle = 'world';
17 var_dump( mb_strrchr($haystack, $needle, $part, $encoding) );
H A Dmb_strrichr_error2.phpt12 $needle = 'world';
17 var_dump( mb_strrichr($haystack, $needle, $part, $encoding) );
/php-src/ext/phar/tests/
H A Dbug74991.phpt11 touch('path/needle.php');
13 …o 4096 (MAXPATHLEN) into 'phar://..sample.phar/some:xx..xx:pat' so it will fail to find needle.php:
14 …H_SEPARATOR . PATH_SEPARATOR . PATH) + OVERFLOW) . PATH_SEPARATOR . PATH); require('needle.php');";
21 unlink('path/needle.php');
/php-src/ext/iconv/tests/
H A Diconv_strpos.phpt9 function foo($haystk, $needle, $offset, $to_charset = false, $from_charset = false)
15 var_dump(strpos($haystk, $needle, $offset));
21 var_dump(iconv_strpos($haystk, $needle, $offset, $to_charset));
23 var_dump(iconv_strpos($haystk, $needle, $offset));
H A Diconv_strrpos.phpt14 function foo($haystk, $needle, $to_charset = false, $from_charset = false)
21 var_dump(iconv_strrpos($haystk, $needle, $to_charset));
24 var_dump(iconv_strrpos($haystk, $needle));
/php-src/ext/standard/tests/filters/
H A Dfilter_errors.inc3 function filter_errors_skipif($needle) {
9 if (fnmatch($filter, $needle)) return;
11 die("skip $needle not available");
/php-src/Zend/tests/
H A Dframeless_jmp_001.phpt6 function test($needle, $haystack) {
7 return in_array($needle, $haystack, true);
/php-src/ext/intl/grapheme/
H A Dgrapheme_util.h26 zend_long grapheme_strrpos_ascii(char *haystack, size_t haystack_len, char *needle, size_t needle_l…
28 int32_t grapheme_strrpos_utf16(char *haystack, size_t haystack_len, char *needle, size_t needle_len…
29 int32_t grapheme_strpos_utf16(char *haystack, size_t haystack_len, char *needle, size_t needle_len,…
/php-src/ext/mbstring/
H A Dmbstring.stub.php91 function mb_strpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): in… argument
93 function mb_strrpos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): i… argument
95 function mb_stripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): i… argument
97 function mb_strripos(string $haystack, string $needle, int $offset = 0, ?string $encoding = null): … argument
100 function mb_strstr(string $haystack, string $needle, bool $before_needle = false, ?string $encoding… argument
103 function mb_strrchr(string $haystack, string $needle, bool $before_needle = false, ?string $encodin… argument
106 function mb_stristr(string $haystack, string $needle, bool $before_needle = false, ?string $encodin… argument
109 function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, ?string $encodi… argument
111 function mb_substr_count(string $haystack, string $needle, ?string $encoding = null): int {} argument

Completed in 27 milliseconds

12345