Question: 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? For example:

```
<?php

class TestClass
{
    var $declaredVar;

    function __construct()
    {
        $this->declaredVar = "I am a declared variable.";
        $this->undeclaredVar = "I wasn't declared, but I still work.";
    }

    function display()
    {
        echo $this->declaredVar . "<br />";
        echo $this->undeclaredVar;
        echo "<br /><br />"; 
    }
}

$test = new TestClass;
$test->display();

$test->declaredVar = "The declared variable was changed.";
$test->undeclaredVar = "The undeclared variable was changed.";

$test->display();

?>

```

In this code, even though `$declaredVar` is the only declared variable, `$undeclaredVar` is just as accessible and useable--it seems to act as if I had declared it as public. 

If undeclared class variables are always accessible like that, what's the point of declaring them all up front?

Answer: 
You should always declare your member variables and specify their accessibility within your classes. I like to put this information at the end of the class after my functions.

You should define them as soon as you have enough information to do so. Possibly in the constructor or via setter functions.

It is important to do this because it makes life much easier for people working with your code. They don't have to guess where different properties are coming from or why they're there. Also, most (if not all) IDEs will not pick up on class variables unless you've declared them somewhere. Code completion/hints are one of the many benefits of IDEs and without declaring your variables, you will render that functionality useless.
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 and define access modifiers manually. It increases code readability.

You can use private modifier for class level variables and provide accessor and mutator methods (Getters and Setters) for them when needed.