3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $strtest = “yyg中文字符yyg”; $pregstr = "/[\x{4e00}-\x{9fa5}]+/u"; if(preg_match($pregstr,$strtest,$matchArray)){ echo $matchArray[0]; } ?>
based on DuoOl
Output for 7.2.0
Warning: Use of undefined constant “yyg中文字符yyg” - assumed '“yyg中文字符yyg”' (this will throw an Error in a future version of PHP) in /in/oEvdG on line 2 中文字符
Output for 5.3.19 - 7.1.10
Notice: Use of undefined constant “yyg中文字符yyg” - assumed '“yyg中文字符yyg”' in /in/oEvdG on line 2 中文字符