?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
class MyClass
{
}
$a = new MyClass;
var_dump(!($a instanceof stdClass));
?>
<?php
class MyClass
{
}
$a = new MyClass;
var_dump(!($a instanceof stdClass));
?>
Answer & Solution
Correct Answer:
Option
A
To check if an object is not an instanceof a class, the logical not operator can be used.
Join the Discussion
Login to post a comment or share your explanation.
Login