- Output for 8.1.0 - 8.1.27, 8.2.0 - 8.2.15, 8.3.0 - 8.3.2
- Fatal error: Cannot use isset() on the result of an expression (you can use "null !== expression" instead) in /in/eT1Fq on line 14
Process exited with code 255.
<?php
class Foo {
public function foo() {
return null;
}
}
$foo = new Foo;
?>
<?= $foo->foo() ?? 'test' ?>
<?= null?->foo() ?? 'test' ?>
<?= isset($foo->foo()) ? $foo->foo() : 'test' ?>