source: branches/version-2_5-dev/data/module/Compat/tests/function/stripos.phpt @ 20119

Revision 20119, 559 bytes checked in by nanasess, 13 years ago (diff)

module 以下は svn:keywords を除外

  • Property svn:eol-style set to LF
Line 
1--TEST--
2Function -- stripos
3--SKIPIF--
4<?php if (function_exists('stripos')) { echo 'skip'; } ?>
5--FILE--
6<?php
7require_once 'PHP/Compat.php';
8PHP_Compat::loadFunction('stripos');
9
10$haystack = 'Cat Dinner Dog Lion Mouse Sheep Wolf Cat Dog';
11$needle  = 'DOG';
12
13// Simple
14var_dump(stripos($haystack, $needle));
15
16// With offset
17var_dump(stripos($haystack, $needle, 4));
18var_dump(stripos($haystack, $needle, 10));
19var_dump(stripos($haystack, $needle, 15));
20var_dump(stripos($haystack, 'idontexist', 15));
21?>
22--EXPECT--
23int(11)
24int(11)
25int(11)
26int(41)
27bool(false)
Note: See TracBrowser for help on using the repository browser.