From c06b3ee62566a0b72e93ff909ff07b98b048c2d4 Mon Sep 17 00:00:00 2001 From: LogMANOriginal Date: Mon, 5 Nov 2018 13:12:37 +0100 Subject: [PATCH] Created Constants (markdown) --- Constants.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Constants.md diff --git a/Constants.md b/Constants.md new file mode 100644 index 0000000..6162c43 --- /dev/null +++ b/Constants.md @@ -0,0 +1,21 @@ +As in most languages, constants should be written in UPPERCASE. + +_Notice_: This does not apply to keywords! + +
Example

+ +**Bad** + +```PHP +const pi = 3.14; +``` + +**Good** + +```PHP +const PI = 3.14; +``` + +

+ +_Reference_: [`Generic.NamingConventions.UpperCaseConstantName`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php) \ No newline at end of file