Basic Types
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.
Namespace
Each name can contain a namespace symbol (\ — backslash), which is similar to that in PHP. The separator can be located either in the middle or at the beginning of any Identifier. End position is not allowed.
The namespace delimiter can be used in conjunction with keywords such as true, false, or null to explicitly indicate a type reference.
The $this Type
The $this variable denotes the type of the object the type is written on. It is a type of its own, so it stands wherever a type stands: inside a union, behind a question mark, or as the type a callable returns.
Comments
A type MAY carry comments, and they are read the way whitespace is: they part tokens and mean nothing of their own.
A line comment begins with either a // or a # marker and runs up to the end of the line. A block comment begins with a /* and runs up to and including the next */.