Bug #55211 [NEW]: ArrayObject::getArrayObject ()

From: Date: Fri, 15 Jul 2011 00:46:31 +0000
Subject: Bug #55211 [NEW]: ArrayObject::getArrayObject ()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-161892@lists.php.net to get a copy of this message
From: Operating system: windows 7 Professional PHP version: 5.3.6 Package: SPL related Bug Type: Bug Bug description:ArrayObject::getArrayObject () 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 bug report at https://bugs.php.net/bug.php?id=55211&edit=1 -- Try a snapshot (PHP 5.2): https://bugs.php.net/fix.php?id=55211&r=trysnapshot52 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55211&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55211&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55211&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55211&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55211&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55211&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55211&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55211&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55211&r=support Expected behavior: https://bugs.php.net/fix.php?id=55211&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55211&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55211&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55211&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55211&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55211&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55211&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55211&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55211&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55211&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55211&r=mysqlcfg Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55211&r=trysnapshot54

« previous php.bugs (#161892) next »