Revision 20116,
559 bytes
checked in by nanasess, 13 years ago
(diff) |
- svn properties を再設定
- 再設定用のスクリプト追加
|
-
Property svn:eol-style set to
LF
-
Property svn:keywords set to
Id
|
Line | |
---|
1 | --TEST-- |
---|
2 | Function -- stripos |
---|
3 | --SKIPIF-- |
---|
4 | <?php if (function_exists('stripos')) { echo 'skip'; } ?> |
---|
5 | --FILE-- |
---|
6 | <?php |
---|
7 | require_once 'PHP/Compat.php'; |
---|
8 | PHP_Compat::loadFunction('stripos'); |
---|
9 | |
---|
10 | $haystack = 'Cat Dinner Dog Lion Mouse Sheep Wolf Cat Dog'; |
---|
11 | $needle = 'DOG'; |
---|
12 | |
---|
13 | // Simple |
---|
14 | var_dump(stripos($haystack, $needle)); |
---|
15 | |
---|
16 | // With offset |
---|
17 | var_dump(stripos($haystack, $needle, 4)); |
---|
18 | var_dump(stripos($haystack, $needle, 10)); |
---|
19 | var_dump(stripos($haystack, $needle, 15)); |
---|
20 | var_dump(stripos($haystack, 'idontexist', 15)); |
---|
21 | ?> |
---|
22 | --EXPECT-- |
---|
23 | int(11) |
---|
24 | int(11) |
---|
25 | int(11) |
---|
26 | int(41) |
---|
27 | bool(false) |
---|
Note: See
TracBrowser
for help on using the repository browser.