// test: false === instanceof comparison with die narrows type after guard
// feature: completion
// Adapted from phpactor if-statement/false.test
// expect: fooMethod(
---
<?php
class Foobar {
public function fooMethod(): void {}
}
class Other {
public function otherMethod(): void {}
}
function test(Foobar|Other $foobar): void {
if (false === $foobar instanceof Foobar) {
die();
}
$foobar-><>
}