preg_match(): Compilation failed: character value in \x{} or \o{} is too large at offset xx on line number xx

2,677次阅读

共计 113 个字符,预计需要花费 1 分钟才能阅读完成。

preg_match在匹配 UTF-8 时不加 u 修饰符会发出此警告。

<?php

preg_match("/^\x{3010}(.*)\x{3011}/u", $content, $matches);

var_dump($matches);

正文完
 
Blood.Cold
版权声明:本站原创文章,由 Blood.Cold 2019-06-04发表,共计113字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。