Refactor create_function into anonymous function
This commit is contained in:
parent
33e762c73d
commit
0c1337a4d4
1 changed files with 3 additions and 3 deletions
|
|
@ -1870,9 +1870,9 @@ class Markdown implements MarkdownInterface {
|
|||
return;
|
||||
}
|
||||
|
||||
$this->utf8_strlen = create_function('$text', 'return preg_match_all(
|
||||
"/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/",
|
||||
$text, $m);');
|
||||
$this->utf8_strlen = function($text) {
|
||||
return preg_match_all('/[\x00-\xBF]|[\xC0-\xFF][\x80-\xBF]*/', $text, $m);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue