What is encapsulation in oop php?



What is encapsulation in oop php?..

Answer / gokilavani s

Encapsulation is fundamental concepts in object oriented programming
Encapsulation provides three main benifits
Data hiding
Code organization
Code reusability
Php using access modifiers public, protected, private control access to the modified and properties
Public- accessible from anywhere
Protected - accessible within class and subclass
Private - accessible only in the class itself

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What is dao in php?

0 Answers  


Tell me how can we pass the variable through the navigation between the pages?

0 Answers  


What is __ construct in php?

0 Answers  


Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?

0 Answers  


What is the meaning of symbol '$' in jquery?

0 Answers  


Explain PHP?

0 Answers  


Who is the father of php?

0 Answers  


What’s the difference between md5(), crc32() and sha1() crypto on PHP? -

2 Answers  


What is array filter php?

0 Answers  


How php statement is different from php script?

0 Answers  


Explain Traits in PHP?

0 Answers  


What is the difference between unlink and unset ?

3 Answers  


Categories