?
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.
Join the Discussion
Login to post a comment or share your explanation.
Login