|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55211 ArrayObject::getArrayObject ()
Submitted: 2011-07-14 20:46 UTC Modified: 2011-07-25 02:31 UTC
From: suman dot madavapeddi at gmail dot com Assigned:
Status: Verified Package: SPL related
PHP Version: 5.3.6 OS: windows 7 Professional
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: suman dot madavapeddi at gmail dot com
New email:
PHP Version: OS:


 [2011-07-14 20:46 UTC] suman dot madavapeddi at gmail dot com
From manual page:

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();

Expected result:
    [pbvar] => public Variable

Actual result:
    [pbvar] => public Variable
    [MyClass5prvar] => Private Variable
    [*pdvar] => Protected Variable


getarraycopy-skip-object-protected-private-properties (last revision 2011-07-25 06:33 UTC) by
getarraycopy-skip-protected-and-private (last revision 2011-07-24 04:17 UTC) by

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-23 15:00 UTC]
-Status: Open +Status: Verified
 [2011-07-24 04:17 UTC]
The following patch has been added/updated:

Patch Name: getarraycopy-skip-protected-and-private
Revision:   1311481025
 [2011-07-25 02:33 UTC]
The following patch has been added/updated:

Patch Name: getarraycopy-skip-object-protected-private-properties
Revision:   1311575639
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC