/hphp/test/zend/bad/ext/standard/tests/strings/stristr_basic.php
PHP | 20 lines | 14 code | 3 blank | 3 comment | 0 complexity | 52d015f05b8061b0d33cc9708386fa4d MD5 | raw file
Possible License(s): LGPL-2.1, BSD-2-Clause, BSD-3-Clause, MPL-2.0-no-copyleft-exception, MIT, LGPL-2.0, Apache-2.0
- <?php
- /* Prototype: string stristr ( string $haystack , mixed $needle [, bool $before_needle ] )
- Description: Case-insensitive strstr().
- */
- echo "*** Testing stristr() : basic functionality ***\n";
- var_dump( stristr("Test string", "teSt") );
- var_dump( stristr("test stRIng", "striNG") );
- var_dump( stristr("teST StrinG", "stRIn") );
- var_dump( stristr("tesT string", "t S") );
- var_dump( stristr("test strinG", "g") );
- var_dump( bin2hex(stristr(b"te".chr(0).b"St", chr(0))) );
- var_dump( stristr("tEst", "test") );
- var_dump( stristr("teSt", "test") );
- var_dump( stristr("Test String", "String", false) );
- var_dump( stristr("Test String", "String", true) );
- ?>
- ===DONE===