http://php.dzone.com/articles/php-speed-private-vs-public-me
For just declaring Public over Private Members I gain 20% of speed and RAM consumption remains the same(both methods are public).
Time(sec) RAM(Mb)
Private 1,53 36
Public 1,27 36
Static 1,47 0,15
*Lower is better.
The first comment is very interesting too.
Interesting, but not surprising. Dare I say this is one more reason not to bother with PPP visibility for most developers in most projects? If you’re writing code with the aim of sharing it with the broader world, PPP can serve a purpose. If you’re writing for yourself or a small team and the code won’t go much further, document your recommended class usage, but don’t focusing on using PPP the "right" way (cause there isn’t one). Now we can say that using private (did you try protected as well?) will slow down your app too. I’m guessing code caching would probably reduce the speed issue though. 
- Michael Kimsal
-
MODX Staff
- 10,725 Posts
Don’t believe everything you read; I’m not saying this is inaccurate, but without a lot more scientific benchmarking and study, I would hardly call this interesting, or consider it accurate.
And the issue of PHP4 compatibility makes it fairly academic at this point.
well i would call it interesting. it is interesting- to me, cause id never tested it. it might now be accurate. but it was interesting =)
hehe no prob. it was a good reminder not to take it at face value.