3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Duplication for completion... interface I1 {} interface I2 extends I1 { public function instanceOfSelf(self $object); public function instanceOfParent(parent $object); } class A implements I1 {} class B implements I2 { private function printBool(bool $b) { echo ($b ? 'true' : 'false') . "\n"; } public function instanceOfSelf(I2 $object) { $this->printBool($object instanceof I2); } public function instanceOfParent(I1 $object) { $this->printBool($object instanceof I1); } } $a = new A; $b = new B; $b->instanceOfSelf($b); // true $b->instanceOfParent($a); // true $b->instanceOfParent($b); // true

This is an error 404

There are `0` results


preferences:
129.22 ms | 997 KiB | 7 Q