Skip to content

PHP compatibility

Matt Acosta edited this page Oct 29, 2018 · 4 revisions

These are intentional differences from PHP. Ideally, this should only include deprecated features that do not see widespread use.

Expressions

The instanceof operator is non-associative, like it's supposed to be.

Before:

PHP always returns false since a boolean is never an instance of a type.

$a instanceof A instanceof B;  // Works!

After:

An error is generated if an operand is preceded and followed by an instanceof operator.

Clone this wiki locally