mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 00:07:22 +01:00
using php documentation regex
This commit is contained in:
@ -61,7 +61,8 @@ final class Str
|
||||
{
|
||||
$code = self::PREFIX.str_replace(' ', '_', $code);
|
||||
|
||||
return (string) preg_replace('/[^\p{L}_0-9]/', '_', $code);
|
||||
// sticks to PHP8.2 function naming rules https://www.php.net/manual/en/functions.user-defined.php
|
||||
return (string) preg_replace('/[^a-zA-Z0-9_\x80-\xff]/', '_', $code);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user