Skip to content

Commit

Permalink
Apply the suggestion from the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo-d committed Aug 28, 2022
1 parent ce907b2 commit 4ff62fa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions wordpress-coding-standards/php.md
Expand Up @@ -81,6 +81,7 @@ Text that goes into HTML or XML attributes should be escaped so that single or d
### Writing include/require statements

Because `include[_once]` and `require[_once]` are language constructs, they do not need parentheses around the path. There should only be one space between the path and the include/require keywords.

It is _strongly recommended_ to use `require[_once]` for unconditional includes.
When using `include[_once]` PHP will throw a warning when the file is not found, but will continue execution which will almost certainly lead to other errors/warnings/notices being thrown if your application depends on the file having been loaded, potentially leading to security leaks. For that reason, `require[_once]` is generally the better choice as it will throw a `Fatal Error` if the file cannot be found.

Expand Down

0 comments on commit 4ff62fa

Please sign in to comment.