Skip to content

Syntax

Boolean and null literals

A literal is a type of exactly one value. The words true and false are the two values of the PHP bool type, null is the only value of the null type. Strings and numbers are literals too.

true and false are not case sensitive.

TruE
literal

resultTypeLang\Type\Literal\BoolLiteralNode

null is not case sensitive either.

NulL
literal

resultTypeLang\Type\Literal\NullLiteralNode

These three words are literals only on their own: as a part of a name or with a namespace they are ordinary names (true-type, true\null).