Calling a variable from another class, issues with scope
<p>Ok I've narrowed down my problem but can't come up with a fix.</p>

<p>I want the first class to be able to reference variables from the second class.</p>

<pre><code>class TheFirstClass{
    public function __construct(){
        include 'SecondClass.php';
        $SecondClass = new SecondClass;
        echo($SecondClass-&gt;hour);
    }
}

//in it's own file
class TheSecondClass{
    public $second;
    public $minute = 60;
    public $hour;
    public $day;

    function __construct(){ 
        $second = 1;
        $minute = ($second * 60);
        $hour = ($minute * 60);
        $day = ($hour * 24);
    } 
}
</code></pre>

<p>But in this situation, only the "minute" is able to be accessed from the other class. If I were to remove the "= 60", then the minute would return nothing along with the rest of the variables.</p>

<p>The variables within the constructor are calculated correctly, but they do not affect the variables of the same name higher in the scope. Why, and what would be the correct way to structure the code instead?</p>
