Which of the given statements is correct about the following PHP 7.1 code?
interface ExampleInterface
{
}
class ExampleClass implements Exampleinterface
{
}
$x = new ExampleClass;
$y = new ExampleClass;
$z = $p = 'NotExampleClass';
var_dump($x instanceof $y);
var_dump($x instanceof $z);
var_dump($x instanceof $p);
?>
Correct Answer:
The code will compile successfully and will print the following output:
bool(true)
bool(true)
bool(false)
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More PHP 5 MCQ Questions