What are the differences between public, private, protected,
static, transient, final and volatile?
Answers were Sorted based on User's Feedback
Answer / nikunj
Public : access anyware in script
Protected: access only same class and access inherited class
Private: access only in same class
Final: restrict overriding with child class
| Is This Answer Correct ? | 59 Yes | 3 No |
Answer / naresh
in object by default all variables are presistent. so some
time we want to avoid that variables means we use transient
for that variable.
| Is This Answer Correct ? | 5 Yes | 8 No |
Answer / bharanikumar
can u plz give me more informa for protected
| Is This Answer Correct ? | 2 Yes | 11 No |
Is echo a function in php?
Which is used to maintain the value of a variable over different pages?
Is multilevel inheritance possible in php?
What is the difference between htmlentities and htmlspecialchars in php?
What is the difference between == and === operator in PHP?
What are the two most common ways to start and finish a php block of code?
How to replace a substring in a given string in php?
What is difference between echo and print_r in php?
Is php front end or back end?
How to return a value back to the function caller?
How to enable error reporting in php?
What is url encoding and decoding in php?