Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Questions on OOP concepts
1. What are the access specifiers available in php ? Explain
2. What is object cloning ?
3. What are the differences between interface and abstract
class ?
4. What is overloading ?
5. What is overriding ?
6. How to prevent function overriding ?
7. What is the use of "final" keyword ?
8. What is static variable ? How will access a static
variable ? What is static class ?

Answers were Sorted based on User's Feedback



Questions on OOP concepts 1. What are the access specifiers available in php ? Explain 2. What is ..

Answer / raghu

Answer according to question no
1. Three access specifiers:
public : can be accessed outside class by any child class
private : can be accessed by only members of class
protected : can be accessed in derived class having
protected methods or variables not by other

2. Making copy of object is nothing but object cloning
e.g. $copy_of_object = clone $object;

3.You neither able to create object of interface nor
abstract class. Difference: In abstract class, u can declare
as well as define methods but in interface u can not define
method u can only declare.

7. Final keyword is used to prevent child class from
overriding method of parent class.

8. Declaring class members or methods as static makes them
accessible without needing an instantiation of the class. A
member declared as static can not be accessed with an
instantiated class object (though a static method can).
Static properties cannot be accessed through the object
using the arrow operator ->.

Is This Answer Correct ?    20 Yes 1 No

Questions on OOP concepts 1. What are the access specifiers available in php ? Explain 2. What is ..

Answer / isroy

4. Overloading in PHP provides means to dynamically
"create" members and methods. These dynamic entities are
processed via magic methods one can establish in a class for
various action types.

The overloading methods are invoked when interacting with
members or methods that have not been declared or are not
visible in the current scope. All overloading methods must
be defined as public.

Is This Answer Correct ?    6 Yes 1 No

Post New Answer

More PHP Interview Questions

Tell me what are the correct and the most two common way to start and finish a php block of code?

0 Answers  


Which is not a file-related function in php?

0 Answers  


What is action hooks and filter hooks?

0 Answers  


What are the characteristics of php?

0 Answers  


What is the substitution of submit in PHP?

6 Answers   RedAlkemi,


How we get ip address of client, previous reference page etc?

0 Answers  


What is the difference between html and php?

0 Answers  


What is an anti csrf token?

0 Answers  


what is CURL?

0 Answers  


Tell me how do I escape data before storing it into the database?

0 Answers  


what is the current salary package in India for a PHP programmer who has 1.5 years experience

0 Answers   ABB,


What is the default time in seconds for which session data is considered valid?

0 Answers  


Categories