PHP 4.0 Bug #10096: get_object_vars does not work as expected
| From: | rcherry at raysoft dot net | Date: | Sun, 01 Apr 2001 07:46:12 +0000 |
| Subject: | PHP 4.0 Bug #10096: get_object_vars does not work as expected | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-50467@lists.php.net to get a copy of this message | ||
From: rcherry@raysoft.net
Operating system: Windows ME
PHP version: 4.0.4pl1
PHP Bug Type: Class/Object related
Bug description: get_object_vars does not work as expected
If variables within a class are set by the constructor, then get_object_vars works OK. If they are
set after the class object is constructed, then it doesn't work OK.
Example:
class a
{ var $b;
}
$aa = new a();
$aa->b = "Hi";
print_r(get_object_vars($aa); //Result will not be as expected.
This error is complicating an effort to persist a class.
===================
Related Issue: It does not appear possible to have a variable within a class which is of type
class. What a shame.
--
Edit Bug report at: http://bugs.php.net/?id=10096&edit=1