Annotation of embedaddon/php/ext/standard/tests/strings/substr_count_basic.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test substr_count() function (basic)
3: --FILE--
4: <?php
5:
6: echo "***Testing basic operations ***\n";
7: var_dump(@substr_count("", ""));
8: var_dump(@substr_count("a", ""));
9: var_dump(@substr_count("", "a"));
10: var_dump(@substr_count("", "a"));
11: var_dump(@substr_count("", chr(0)));
12: $a = str_repeat("abcacba", 100);
13: var_dump(@substr_count($a, "bca"));
14: $a = str_repeat("abcacbabca", 100);
15: var_dump(@substr_count($a, "bca"));
16: var_dump(substr_count($a, "bca", 200));
17: var_dump(substr_count($a, "bca", 200, 50));
18:
19: echo "Done\n";
20:
21: ?>
22: --EXPECTF--
23: ***Testing basic operations ***
24: bool(false)
25: bool(false)
26: int(0)
27: int(0)
28: int(0)
29: int(100)
30: int(200)
31: int(160)
32: int(10)
33: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>