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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me how do I escape data before storing it into the database?

734


Does wordpress still use php?

719


What is rest api in php?

697


How to check your php installation?

713


What is the function func_num_args() used for?

714


What is an anti csrf token?

677


How can we submit form without a submit button?

738


How do you find the length of a string in php?

700


Is php an oop?

716


How to find datatype of variable in php?

708


Explain me difference between mysql_connect and mysql_pconnect?

728


What is the use of mysql_real_escape_string in php?

640


discuss the issue of software theft in ghana and how it has affected the economy

1874


Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would we validate whether the field is empty? Print a message "the email cannot be empty" in this case?

886


What are encryption functions in php?

779