Skip to content

Commit 0c2fc6b

Browse files
committed
PHP: remove reference to POSIX regex functions
These were removed from PHP in PHP 7.0 and WP nowadays has a PHP 7.2 minimum, which means these function cannot be used anyhow, so this is no longer relevant.
1 parent 369e314 commit 0c2fc6b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • wordpress-coding-standards

wordpress-coding-standards/php.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1012,7 +1012,8 @@ Closures should not be passed as filter or action callbacks, as removing these v
10121012

10131013
### Regular Expressions
10141014

1015-
Perl compatible regular expressions ([PCRE](https://www.php.net/pcre), `preg_` functions) should be used in preference to their POSIX counterparts. Never use the `/e` switch, use `preg_replace_callback` instead.
1015+
Perl compatible regular expressions ([PCRE](https://www.php.net/pcre), `preg_` functions) should be used.
1016+
Never use the `/e` switch, use `preg_replace_callback` instead.
10161017

10171018
It's most convenient to use single-quoted strings for regular expressions since, contrary to double-quoted strings, they have only two metasequences which need escaping: `\'` and `\\`.
10181019

0 commit comments

Comments
 (0)