ExamVeda
Login
Home
This question belongs to PHP Object Oriented Concept
Object Oriented Concept
?

What will be the output of the following PHP code?
<?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.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.