Edit report at https://bugs.php.net/bug.php?id=48016&edit=1

 ID:                 48016
 Updated by:         yohg...@php.net
 Reported by:        c dot r1 at gmx dot de
 Summary:            stdClass::__setState is not defined although
                     var_export() uses it
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            Class/Object related
 Operating System:   Linux
 PHP Version:        5.3
-Assigned To:        
+Assigned To:        yohgaki
 Block user comment: N
 Private report:     N

 New Comment:

It seems issue is fixed.

[yohgaki@dev PHP-5.4]$ ./php-bin -a
Interactive shell

php > $o = new stdClass;
php > var_export($o);
stdClass::__set_state(array(
))php > $o->foo = 123;
php > $o->bar = 456;
php > var_export($o);
stdClass::__set_state(array(
   'foo' => 123,
   'bar' => 456,
))php >


Previous Comments:
------------------------------------------------------------------------
[2009-04-19 12:51:05] c dot r1 at gmx dot de

Description:
------------
var_export() for an object which is just used for storing properties and is of 
stdClass produces invalid code as stdClass::__setState is not implemented, for 
no appearant reason. It would be nice to have an implementation of this in 
5.3.0, and, if possible, a workaround for earlier versions of php.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=48016&edit=1

Reply via email to