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 |
what is PDO?
How to create a session? How to remove data from a session?
How to implement a class named dragonball. This class must have an attribute named ballcount (which starts from 0) and a method ifoundaball. When ifoundaball is called, ballcount is increased by one. If the value of ballcount is equal to seven, then the message you can ask your wish is printed, and ballcount is reset to 0. How would you implement this class?
What is the difference between $name and $$name?
What is composer install?
Which is not a php magic constant?
What is php and why we use it?
What is difference between str_replace and substr_replace
What is MIME?
What is difference between strstr() and stristr() in PHP?
How can we calculate the similarity between two strings?
Whether site will complete the execution of the script if Fatal error occurs ?