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 |
How can I prevent sql-injection in php?
Explain me the difference between include and require?
What is the role of php.ini file?
What is php good for?
How many ways to include variables in double-quoted strings in php?
What is pdo in php why use?
Which is better python or php?
I have written a source code in php but I do not know how to compile that and conduct it with a website please explain me the how to compile that ?
How many data types are used by php?
What is the functionality of the function strstr and stristr?
Why print_r is used in php?
Explain what are the different errors in php?