Skip to content

Commit 29d0434

Browse files
PHP: fix ambiguous wording in eval() paragraph (#158)
* PHP: fix ambiguous wording in eval() paragraph The original sentence "Both of these must not be used" was changed to "Neither of these must be used" in 4361cec (PR 65), based on a suggestion noting the original sentence read weird. However, it seems to me that "Neither of these must be used" can be read as "there is no requirement to use either" instead of the intended prohibition. This commit fixes this ambiguity. --------- Co-authored-by: Gary Jones <github@garyjones.io>
1 parent e156375 commit 29d0434

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • wordpress-coding-standards

wordpress-coding-standards/php.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,9 @@ switch ( $foo ) {
991991

992992
The `goto` statement must never be used.
993993

994-
The `eval()` construct is _very dangerous_ and is impossible to secure. Additionally, the `create_function()` function, which internally performs an `eval()`, is deprecated since PHP 7.2 and has been removed in PHP 8.0. Neither of these must be used.
994+
The `eval()` construct is _very dangerous_ and is impossible to secure. It must not be used.
995+
996+
The `create_function()` function internally performs an `eval()`. It was deprecated in PHP 7.2 and removed in PHP 8.0. It must not be used.
995997

996998
### Closures (Anonymous Functions)
997999

0 commit comments

Comments
 (0)