Skip to content

Commit 2c74685

Browse files
committed
Configuration Options: update php_version example
1 parent 619ea6a commit 2c74685

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wiki/Configuration-Options.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ By default, PHP_CodeSniffer will look inside its own `src/Standards` directory t
159159
## Setting the PHP version
160160
Some sniffs change their behaviour based on the version of PHP being used to run PHPCS. For example, a sniff that checks for namespaces may choose to ignore this check if the version of PHP does not include namespace support. Sometimes a code base that supports older PHP versions is checked using a newer PHP version. In this case, sniffs see the new PHP version and report errors that may not be correct. To let the sniffs know what version of PHP you are targeting, the `php_version` configuration option can be used.
161161

162-
$ phpcs --config-set php_version 50403
162+
$ phpcs --config-set php_version 70416
163163

164164
> [!IMPORTANT]
165-
> The format of the `php_version` value is the same as the PHP_VERSION_ID constant. e.g., 50403 for version 5.4.3.
165+
> The format of the `php_version` value is the same as the PHP_VERSION_ID constant. e.g., 70416 for version 7.4.16.
166166
167167
<p align="right"><a href="#table-of-contents">back to top</a></p>
168168

0 commit comments

Comments
 (0)