PHP extended class inheritance
<p>I have a base class which I am extending, but I can't work out why the variables I am defining in the base class arn't accessible by the child class. I understood that they had to be protected to allow access, but they still won't work for me.</p>

<pre><code>class user {

    protected static $username;
    protected static $password;
    protected static $remember;

    function __construct() {

    }

    public function login($username, $password, $remember) {

        $this-&gt;username = $username;
        $this-&gt;password = $password;
        $this-&gt;remember = $remember;

        $login = new login();

    }

}

class login extends user {

    function __construct() {

        print("user is: " . $this-&gt;username);

        die();

    }
}
</code></pre>
