Annotation of embedaddon/php/ext/standard/tests/strings/stristr.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: stristr() function
3: --FILE--
4: <?php
5: var_dump(stristr());
6: var_dump(stristr(array(), ""));
7: var_dump(stristr("", array()));
8: var_dump(stristr(array(), array()));
9: var_dump(stristr("tEsT sTrInG", "tEsT"));
10: var_dump(stristr("tEsT sTrInG", "stRiNg"));
11: var_dump(stristr("tEsT sTrInG", "stRiN"));
12: var_dump(stristr("tEsT sTrInG", "t S"));
13: var_dump(stristr("tEsT sTrInG", "g"));
14: var_dump(md5(stristr("te".chr(0)."st", chr(0))));
15: var_dump(@stristr("", ""));
16: var_dump(@stristr("a", ""));
17: var_dump(@stristr("", "a"));
18: var_dump(md5(@stristr("\\\\a\\", "\\a")));
19: var_dump(stristr("tEsT sTrInG", " "));
20: ?>
21: --EXPECTF--
22: Warning: stristr() expects at least 2 parameters, 0 given in %s on line %d
23: NULL
24:
25: Warning: stristr() expects parameter 1 to be string, array given in %s on line %d
26: NULL
27:
28: Warning: stristr(): needle is not a string or an integer in %s on line %d
29: bool(false)
30:
31: Warning: stristr() expects parameter 1 to be string, array given in %s on line %d
32: NULL
33: string(11) "tEsT sTrInG"
34: string(6) "sTrInG"
35: string(6) "sTrInG"
36: string(8) "T sTrInG"
37: string(1) "G"
38: string(32) "7272696018bdeb2c9a3f8d01fc2a9273"
39: bool(false)
40: bool(false)
41: bool(false)
42: string(32) "6ec19f52f0766c463f3bb240f4396913"
43: string(7) " sTrInG"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>