PhpRiot
News Archive
PhpRiot Newsletter
Your Email Address:

More information

My privates are not public, they are protected

Note: This article was originally published at Planet PHP on 19 July 2010.
Planet PHP
This week there was an interesting discussion on twitter between several people from the PHP community on the use of access modifiers, and why things should be public, protected or private, or why not. The thing that triggered this was the fact that the new Symfony2 Coding Style disallows the usage of private methods. This discussion earlier on triggered Lukas Smith to post his opinion. I commented there but the comment became thus long that I decided to write a blogpost about it myself.