1

这是我的代码:

$myText = "@koraytugaykoray@";
$mypattern = "@k.*y@";
echo "<br />";

preg_match_all($mypattern, $myText);

我正进入(状态:

警告:preg_match_all() 至少需要 3 个参数,2 个在 C:\DocumentRoot\Framework\index.php 第 12 行给出

但根据: http: //php.net/manual/en/function.preg-match-all.php,这应该没问题吧?

4

1 回答 1

4

在 5.4.0 之前的版本中,第三个参数preg_match_all()不是可选的:

5.4.0 匹配参数变为可选。

资源

于 2013-01-23T18:29:19.333 回答