note 94407 rejected from keyword.parent by danbrown
| From: | danbrown@php.net | Date: | Tue, 03 Nov 2009 15:47:07 +0000 |
| Subject: | note 94407 rejected from keyword.parent by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-162358@lists.php.net to get a copy of this message | ||
Note Submitter: novojilov dot ilya at gmail dot com
----
<?php
$n = new stdClass();
$n->var1 = 5;
$n->var2 = new classB();
class classB {
function __construct() {
$this->var1 = parent::var1;
}
}
?>
in this situation , how can i get parent variable from inside a member ( inside classB ) ???
<?php $this->var1 = parent::var1; ?>
returns error