1--TEST--
2Test substr_count() function (basic)
3--FILE--
4<?php
5
6echo "***Testing basic operations ***\n";
7var_dump(@substr_count("", ""));
8var_dump(@substr_count("a", ""));
9var_dump(@substr_count("", "a"));
10var_dump(@substr_count("", "a"));
11var_dump(@substr_count("", chr(0)));
12$a = str_repeat("abcacba", 100);
13var_dump(@substr_count($a, "bca"));
14$a = str_repeat("abcacbabca", 100);
15var_dump(@substr_count($a, "bca"));
16var_dump(substr_count($a, "bca", 200));
17var_dump(substr_count($a, "bca", 200, 50));
18
19echo "Done\n";
20
21?>
22--EXPECTF--
23***Testing basic operations ***
24bool(false)
25bool(false)
26int(0)
27int(0)
28int(0)
29int(100)
30int(200)
31int(160)
32int(10)
33Done
34