I noticed that Joomla uses less secure var type for variables in classes
Why is this?
In my own components,plugins,modules should I follow this convention or use a more secure private, public and protected keywords.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Joomla’s roots are in PHP 4, (and as @Palantir notes, they even still support it!).
It is very difficult to “add” PHP 5’s new OOP features like
private/public/protectedto a complex system like that. There are too many dependencies to be aware of, and too much potential for obscure bugs.They will probably start appearing in the future when PHP 4 support is dropped (shouldn’t be long anymore), and parts of the system undergo a fundamental rewrite.