Basic Types

Edit pageLast modified: 02 February 2025

The parser does not impose restrictions on type naming. The type name must begin with the characters [a-zA-Z\x80-\xff] (any letter) and _ (underscore) and can contain any characters within the limit [a-zA-Z0-9\x80-\xff] (any letter), as well as the characters _ (underscore) and - (dash).

In this case, the only difference from the PHP grammar is that a dash (-) symbol is allowed in the middle of the name.

In addition, it is worth noting that the case-insensitive names true, false and null are registered PHP literals, so their use as a custom type name is unacceptable.

tip

Example of a simple Identifier.

ExampleTypeName

tip

Dashes (-) in Identifier are also acceptable.

example-type

tip

The reserved keyword (true) is allowed as part of the Identifier.

true-type