Edit report at https://bugs.php.net/bug.php?id=55211&edit=1
ID: 55211 Updated by: d...@php.net Reported by: suman dot madavapeddi at gmail dot com Summary: ArrayObject::getArrayObject () -Status: Open +Status: Verified Type: Bug Package: SPL related Operating System: windows 7 Professional PHP Version: 5.3.6 Block user comment: N Private report: N Previous Comments: ------------------------------------------------------------------------ [2011-07-14 20:46:31] suman dot madavapeddi at gmail dot com Description: ------------ --- >From manual page: http://www.php.net/arrayobject.getarraycopy%23Description --- when it is referred to an object it should return only public properties of an object .But, Instead it is returning all the Properties of an Object Test script: --------------- class MyClass{ public $pbvar = "public Variable"; private $prvar = "Private Variable"; protected $pdvar = "Protected Variable"; } $ar = new ArrayObject( new MyClass()); $arc = $ar->getArrayCopy(); print_r($arc); Expected result: ---------------- Array ( [pbvar] => public Variable ) Actual result: -------------- Array ( [pbvar] => public Variable [MyClass5prvar] => Private Variable [*pdvar] => Protected Variable ) ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=55211&edit=1