ExamVeda
Login
Home
This question belongs to PHP Object Oriented Concept
Object Oriented Concept
?

Which version of PHP introduced the visibility keywords i.e public, private, and protected?

Answer & Solution
Correct Answer: Option B
In PHP 4, all properties were declared with var keyword, which is identical in effect to using public. For the sake of backward compatibility, PHP 5 accepts var in place of public for properties.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.