wp-config
wp-config copied to clipboard
Disallow numeric constant name
close #4
Note: There are a few more constant names will break, e.g: null, true, false.
Haven't think of a good way to catch them all.
Pull Request Test Coverage Report for Build 39
- 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 100.0%
| Totals | |
|---|---|
| Change from base Build 38: | 0.0% |
| Covered Lines: | 19 |
| Relevant Lines: | 19 |
💛 - Coveralls
Update: I just noticed that you mentioned this in #4 and the intention of this PR is to disable that behavior anyway.
Fair enough. 😅
It's technically valid to use numeric constants. You can access them using the constant() function.

null, true, and false are already predefined constants, so they should already fail if a user attempts to redefine them.
