note 115091 added to arrayobject.getarraycopy

From: Date: Sat, 24 May 2014 07:42:34 +0000
Subject: note 115091 added to arrayobject.getarraycopy
Groups: php.notes 
Request: Send a blank email to php-notes+get-199610@lists.php.net to get a copy of this message
"When the ArrayObject refers to an object an array of the public properties of that object will be returned." This description does not seem to be right: <?php class A { public $var = 'var'; protected $foo = 'foo'; private $bar = 'bar'; } $o = new ArrayObject(new A()); var_dump($o->getArrayCopy()); /* Dumps: array(3) { ["var"]=> string(3) "var" ["*foo"]=> string(3) "foo" ["Abar"]=> string(3) "bar" } */ ?> So it does not only include the public properties. ---- Server IP: 212.124.37.9 Probable Submitter: 88.217.5.127 ---- Manual Page -- http://php.net/manual/en/arrayobject.getarraycopy.php Edit -- https://master.php.net/note/edit/115091 Del: integrated -- https://master.php.net/note/delete/115091/integrated Del: useless -- https://master.php.net/note/delete/115091/useless Del: bad code -- https://master.php.net/note/delete/115091/bad+code Del: spam -- https://master.php.net/note/delete/115091/spam Del: non-english -- https://master.php.net/note/delete/115091/non-english Del: in docs -- https://master.php.net/note/delete/115091/in+docs Del: other reasons-- https://master.php.net/note/delete/115091 Reject -- https://master.php.net/note/reject/115091 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#199610) next »