note 8487 added to Classes and Objects
| From: | simon dot li at hongkong dot com | Date: | Wed, 13 Sep 2000 20:15:56 +0000 |
| Subject: | note 8487 added to Classes and Objects | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4922@lists.php.net to get a copy of this message | ||
About casting of object, say, i got:
class A extends B {
function A() {
$this->B();
}
....
}
$b = new B();
$a = new A();
I wanna have a object of class A with "content" of $b:
$a = (A) $b; // not a valid code,(right?) as for illustration.
http://www.php.net/manual/language.oop.php