PHP TypeLang Help

Constant Types

Unlike identifiers (type names), constants cannot contain the dash (-) character. However, the grammar of the type name and the constant are identical, so this conflict of semantics will have to be resolved independently during the implementation of a custom solution that uses the TypeLang grammar.

Namespaces specifying a reference to a constant are also allowed.

Given the complete identity of the grammar of constants with named type, they cannot contain case-insensitive names true, false and null of literals.

Class Constants

Class constants begin with any type name, then contain a double colon (::) character, and then the constant name.

Constant Masks

A reference to a certain set of constants can be defined using a mask. The use of masks is identical to regular constants, but must be terminated with an asterisk (*).

Prefixes on class constants can be omitted, so type will mean any class constant.

03 February 2025