note 10574 added to Type Juggling
| From: | dsridharan_aero at yahoo dot com | Date: | Thu, 11 Jan 2001 10:56:35 +0000 |
| Subject: | note 10574 added to Type Juggling | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9646@lists.php.net to get a copy of this message | ||
What if I want to typecast two variables to object?
eg :
$var_A = 10;
$object = (object) $var_A;
$object->scalar; //this accesses $var_A
$var_B = 20;
$object = (object) $var_B;
Now how can I access $var_B?
http://www.php.net/manual/language.types.type-juggling.php