ID: 34345 Updated by: [EMAIL PROTECTED] Reported By: stochnagara at hotmail dot com Status: Open Bug Type: Feature/Change Request -Operating System: windows xp +Operating System: * PHP Version: 5CVS-2005-09-02 (snap) -Assigned To: +Assigned To: helly New Comment:
The documentaion is updated here: http://php.net/~helly Previous Comments: ------------------------------------------------------------------------ [2005-09-02 13:25:09] stochnagara at hotmail dot com Description: ------------ ArrayObject has a method called setFlags. This method is still not documented (set bug #34101). Anyway, I found out what is its possible purpose - if the passed parameter is an even number then ArrayObject's internal array values are printed in var_dump and if the passed parameter is an odd number then object properties of the class which extends ArrayObject are show. (See also bug #33799). But I suggest setFlags fills another gap: set possible values to be 0, 1 or 2. 0 and 1 keep old functionality and 2 allows var_dump to print both internal array values and properties of the class. Reproduce code: --------------- <? class dummy extends ArrayObject { public $var; function __construct() { $this->var = 'override'; $this['internal'] = 'base'; } } $foo = new dummy(); for ($i = 0; $i < 3; $i++) { $foo->setFlags ($i); var_dump($foo); } Expected result: ---------------- object(dummy)#1 (1) { ["internal"]=> string(4) "base" } object(dummy)#1 (1) { ["var"]=> string(8) "override" } object(dummy)#1 (2) { ["internal"]=> string(4) "base", ["var"]=> string(8) "override" } Actual result: -------------- object(dummy)#1 (1) { ["internal"]=> string(4) "base" } object(dummy)#1 (1) { ["var"]=> string(8) "override" } object(dummy)#1 (1) { ["internal"]=> string(4) "base" } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=34345&edit=1