File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ private static function _dump(&$var, int $level = 0)
64
64
return '" ' . strtr ($ var , $ table ) . '" ' ;
65
65
66
66
} elseif (is_string ($ var )) {
67
- return "' " . preg_replace ('# \'| \\\\(?=[ \'\\\\]|\z)# ' , '\\\\$0 ' , $ var ) . "' " ;
67
+ return "' " . preg_replace ('# \'| \\\\(?=[ \'\\\\]|$)#D ' , '\\\\$0 ' , $ var ) . "' " ;
68
68
69
69
} elseif (is_array ($ var )) {
70
70
$ space = str_repeat ("\t" , $ level );
@@ -229,13 +229,13 @@ public static function unformatDocComment(string $comment): string
229
229
230
230
public static function isIdentifier ($ value ): bool
231
231
{
232
- return is_string ($ value ) && preg_match ('#^ ' . self ::PHP_IDENT . '\z# ' , $ value );
232
+ return is_string ($ value ) && preg_match ('#^ ' . self ::PHP_IDENT . '$#D ' , $ value );
233
233
}
234
234
235
235
236
236
public static function isNamespaceIdentifier ($ value , bool $ allowLeadingSlash = false ): bool
237
237
{
238
- $ re = '#^ ' . ($ allowLeadingSlash ? '\\\\? ' : '' ) . self ::PHP_IDENT . '( \\\\' . self ::PHP_IDENT . ')*\z# ' ;
238
+ $ re = '#^ ' . ($ allowLeadingSlash ? '\\\\? ' : '' ) . self ::PHP_IDENT . '( \\\\' . self ::PHP_IDENT . ')*$#D ' ;
239
239
return is_string ($ value ) && preg_match ($ re , $ value );
240
240
}
241
241
You can’t perform that action at this time.
0 commit comments