(PHP 4 >= 4.3.0, PHP 5, PHP 7, PHP 8)
mb_substr_count — 统计字符串出现的次数
   统计子字符串 needle 出现在字符串 haystack 中的次数。
  
   子字符串 needle 出现在 string haystack 中的次数。
  
| 版本 | 说明 | 
|---|---|
| 8.0.0 | 现在 encoding可以为 null。 | 
示例 #1 mb_substr_count() 示例
<?php
echo mb_substr_count("This is a test", "is"); // 输出 2
?>