What are the differences between public, private, protected,
static, transient, final and volatile?

Answers were Sorted based on User's Feedback



What are the differences between public, private, protected, static, transient, final and volatile?..

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

What are the differences between public, private, protected, static, transient, final and volatile?..

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

What are the differences between public, private, protected, static, transient, final and volatile?..

Answer / bharanikumar

can u plz give me more informa for protected

Is This Answer Correct ?    2 Yes 11 No

Post New Answer

More PHP Interview Questions

how can we check mail function with '127.0.0.1' (before submitting a site?

1 Answers  


How to update memcached when you make changes to php?

0 Answers  


Is rent a variable cost?

0 Answers  


What is difference between mysqli and mysql?

0 Answers  


Tell me what is the definition of a session?

0 Answers  






how can i disable multiple user in the same password in my website using any scripts

1 Answers  


How can I check if a value is already in an array?

3 Answers   Rushmore Consultancy,


What is php data type?

0 Answers  


Which operator is used to concatenate two strings in PHP?

0 Answers  


how to open & closing opening period in fico

0 Answers   NS,


What are the final class and final method?

0 Answers  


What is the difference between unlink and unset ?

3 Answers  


Categories