x
 
<!DOCTYPE html>
<html>
<body>
<?php
$str = "abcabcab"; 
echo substr_count($str,"abcab"); // 该函数不会计算重叠的子字符串,因此只会输出 1
?>
</body>
</html>