note 29879 rejected from language.types.object by betz

From: Date: Thu, 27 Feb 2003 19:06:40 +0000
Subject: note 29879 rejected from language.types.object by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-44622@lists.php.net to get a copy of this message
How I may use Class TYpe casting For example class Base { function getX() { } } class Base1 extends Base { function getX() { return 1; } } class Base2 extends Base { function getX() { return 2; } } $var = new Base1(); $var2 = (Base)$var; //!!! It not work??? Why???

« previous php.notes (#44622) next »