I\'m new to the OOP paradigm, so there\'s probably a simple explanation for this question...
Do you always need to declare public object-wide variables in a class? F
As Federico Culloca said "That variable isn't uninitialized, it's just undeclared". Also you didn't define any access modifiers for them so that they behaving like public modifier applied to them.
You may already have known. PHP is a loosely typed language. But a programmer should always follow the best practices (but not to use primitive data types in php).
You should use private modifier for class level variables and provide accessor and mutator methods (Getters and Setters) for them.