On 24 Sep 2006, at 01:09, Robert Cummings wrote:
It's broken, it doesn't preserve references.
<?php
class A {
private $A;
}
class B extends A {
private $A;
public $B;
protected $c;}
$a = new B;
$b = new B;
$b->B = $a;
var_dump(object2array($b));
?>
array(3) {
["A"]=>
NULL
["B"]=>
object(B)#1 (4) {
["A:private"]=>
NULL
["B"]=>
NULL
["c:protected"]=>
NULL
["A:private"]=>
NULL
}
["c"]=>
NULL
}
Reference preserved. It's not like I care about PHP4, nor am I doing
a deep conversion.
Marcus
--
Marcus Bointon
Synchromedia Limited: Creators of http://www.smartmessages.net/
marcus@xxxxxxxxxxxxxxxxxx | http://www.synchromedia.co.uk/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php