When reading about PCRE Pattern Modifiers I noticed that each modifier has a string literal, which I’m familiar with using, and a constant, which I figured was fair game as an explicit alternative.
However, when referring to these constants, say like this
echo PCRE_CASELESS === "i";
I get this error
PHP Notice: Use of undefined constant PCRE_CASELESS - assumed 'PCRE_CASELESS'
Reading the manual carefully I noticed that it says
The names in parentheses refer to internal PCRE names for these modifiers
Internal to what? The fact that the documentation lists them lead me to assume that they were available somehow in the global scope.
Internal to the pcre-library. They are not exposed to php userland-code. That they appear in the manual is only for information for those, who for example knows the constants from the library itself, or other languages implementations. So one see “PCRE_CASELESS” and knows, whats going on without reading the whole text again.