This question may seem totally unrelated to this thread, but it may be at the heart of this problem, and others I'd wind up posting if I don't get something straight. While I've taken at least 2 college courses (Java and C++), that dealt with Classes, I've never actually written anything longer than a few pages in either language. I'm feeling my way along at the same time I'm reading Zandstra's PHP5 Objects, Patterns, and Practice. Here's the problem I'm facing.
What is the guideline for creating local variables that you use and throw away versus class properties you keep?
I think I may have been creating all kinds of class properties simply because they were needed by the Class methods. When I look at my classes, I probably have a property bloat I could have avoided by creating local variables I used and discarded inside my Class methods. I feel "guilty" whenever I create a local variable, like I'm breaking some kind of unwritten OOP law. I get it about global variables, which everybody remembers to mention and warn you about, but I'm uncertain about how permissible local variables are.