Are there any potential pitfalls to be aware of when using substr_count() in PHP 5.3?

When using substr_count() in PHP 5.3, one potential pitfall to be aware of is that the function is case-sensitive. This means that if you are searching for a substring, it will only match exact cases. To solve this issue, you can convert both the string and the substring to lowercase or uppercase before using substr_count().

$string = "Hello World";
$substring = "hello";
$lowercase_string = strtolower($string);
$lowercase_substring = strtolower($substring);

$count = substr_count($lowercase_string, $lowercase_substring);

echo $count; // Output: 1