THEORY
a) Abstract
b) Protected
c) Final
d) Static
a) classname()
b) _construct()
c) function _construct()
d) function __construct()
a) class creation
b) object creation
c) object instantiation
d) class instantiation
a) Polymorphism
b) Inheritance
c) Encapsulation
d) Abstraction
a) PHP 4
b) PHP 5
c) PHP 5.3
d) PHP 6
Que.1
In the PHP code given below, what is/are the properties?
b) public $name;
c) class Example
d) function sample()
Que.2 What will be the output of the following PHP code?
b) bool(false)
c) Error
d) None of the above
Que. 3 What will be the output of the following PHP code?
bool(false)
b) bool(true)
bool(true)
c) bool(false)
bool(true)
d) bool(true)
bool(false)
Que 4 What will be the output of the following code?
b) My name is BobBob
c) My name is BobMy name is Bob
d) My name is Bob Bob
Que. 5 What will be the output of the following PHP code?
bool(false)
b) bool(true)
bool(true)
c) bool(false)
bool(true)
d) bool(true)
bool(false)
Que. 1
Which method scope prevents a method
from being overridden by a subclass?
a) Abstract
b) Protected
c) Final
d) Static
Que.2
PHP recognizes constructors by the
name..
a) classname()
b) _construct()
c) function _construct()
d) function __construct()
Que 3
The practice of creating objects
based on predefined classes is often referred to as..
a) class creation
b) object creation
c) object instantiation
d) class instantiation
Que.4
The practice of
separating the user from the true inner workings of an application
through well-known interfaces is known as..
a) Polymorphism
b) Inheritance
c) Encapsulation
d) Abstraction
Que.5
Which version of PHP introduced the
instance of keyword?
a) PHP 4
b) PHP 5
c) PHP 5.3
d) PHP 6
PROGRAMS :
<?php
class Example
{
public $name;
function Sample()
{
echo "This is an example";
}
}
?>
b) public $name;
c) class Example
d) function sample()
Que.2 What will be the output of the following PHP code?
<?php
class MyClass
{
}
$a = new MyClass;
var_dump(!($a instanceof stdClass));
?>
b) bool(false)
c) Error
d) None of the above
Que. 3 What will be the output of the following PHP code?
<?php
class ParentClass
{
}
class MyClass extends ParentClass
{
}
$a = new MyClass;
var_dump($a instanceof MyClass);
var_dump($a instanceof ParentClass);
?>
bool(false)
b) bool(true)
bool(true)
c) bool(false)
bool(true)
d) bool(true)
bool(false)
Que 4 What will be the output of the following code?
<?php
$foo = 'Bob';
$bar = &$foo;
$bar = "My name is $bar";
echo $bar;
echo $foo;
?>
b) My name is BobBob
c) My name is BobMy name is Bob
d) My name is Bob Bob
Que. 5 What will be the output of the following PHP code?
<?php
interface MyInterface
{
}
class MyClass implements MyInterface
{
}
$a = new MyClass;
var_dump($a instanceof MyClass);
var_dump($a instanceof MyInterface);
?>
bool(false)
b) bool(true)
bool(true)
c) bool(false)
bool(true)
d) bool(true)
bool(false)
Thanks for sharing your view to our knowledge’s, its helps me plenty keep sharing…
ReplyDeletePHP Training Center in Chennai|PHP Course Chennai
Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervor like mine to grasp great deal more around this condition.
ReplyDeleteindustrial safety courses in chennai
nice course. thanks for sharing this post this post harried me a lot.
ReplyDeleteMCSE Training in Noida
It’s great to come across a blog every once in a while that isn’t the same out of date rehashed material. Fantastic read.
ReplyDeleteData science Course Training in Chennai |Best Data Science Training Institute in Chennai
matlab training chennai | Matlab course in chennai
I have to voice my passion for your kindness giving support to those people that should have guidance on this important matter.
ReplyDeleteMCSE Training in chennai | mcse training class chennai
wonderful article. Very interesting to read this article.I would like to thank you for the efforts you had made for writing this awesome article.
ReplyDeleteAWS training in chennai | AWS training in anna nagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery