1--TEST--
2Test stristr() function : basic functionality
3--FILE--
4<?php
5
6echo "*** Testing stristr() : basic functionality ***\n";
7
8var_dump( stristr("Test string", "teSt") );
9var_dump( stristr("test stRIng", "striNG") );
10var_dump( stristr("teST StrinG", "stRIn") );
11var_dump( stristr("tesT string", "t S") );
12var_dump( stristr("test strinG", "g") );
13var_dump( bin2hex(stristr("te".chr(0)."St", chr(0))) );
14var_dump( stristr("tEst", "test") );
15var_dump( stristr("teSt", "test") );
16
17var_dump( stristr("Test String", "String", false) );
18var_dump( stristr("Test String", "String", true) );
19?>
20--EXPECT--
21*** Testing stristr() : basic functionality ***
22string(11) "Test string"
23string(6) "stRIng"
24string(6) "StrinG"
25string(8) "T string"
26string(1) "G"
27string(6) "005374"
28string(4) "tEst"
29string(4) "teSt"
30string(6) "String"
31string(5) "Test "
32