gs gs107 Objects and Databases - PHP Object Basics - Quiz No.2
gs gs107 PHP: Hypertext Preprocessor Quiz
This quiz belongs to book/course code gs gs107 PHP: Hypertext Preprocessor of gs organization. We have 73 quizzes available related to the book/course PHP: Hypertext Preprocessor. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Objects and Databases. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
<?php class MyClass { } class NotMyClass { } $a = new MyClass; var_dump($a instanceof MyClass); var_dump($a instanceof NotMyClass); ?>
bool(true) bool(true)
bool(false) bool(false)
bool(true) bool(false)
bool(false) bool(true)
<?php class ParentClass { } class MyClass extends ParentClass { } $a = new MyClass; var_dump($a instanceof MyClass); var_dump($a instanceof ParentClass); ?>
bool(false) bool(false)
bool(true) bool(true)
bool(false) bool(true)
bool(true) bool(false)
<?php class MyClass { } $a = new MyClass; var_dump(!($a instanceof stdClass)); ?>
<?php interface MyInterface { } class MyClass implements MyInterface { } $a = new MyClass; var_dump($a instanceof MyClass); var_dump($a instanceof MyInterface); ?>
bool(false) bool(false)
bool(true) bool(true)
bool(false) bool(true)
bool(true) bool(false)