|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1261 Cannot access an array of class objects stored in object
Submitted: 1999-03-24 04:56 UTC Modified: 1999-03-24 09:31 UTC
From: alsol at ssu dot sumy dot com Assigned:
Status: Closed Package: Parser error
PHP Version: 3.0.6 OS: FreeBSD 3.1-RELEASE
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: alsol at ssu dot sumy dot com
New email:
PHP Version: OS:


 [1999-03-24 04:56 UTC] alsol at ssu dot sumy dot com
class B
	var $y;
	function B( $n )
		$this->y = "test_$n";

class A
	var $x;
	function A()
		$this->x[0] = new B( 0 );
		$this->x[1] = new B( 1 );

$t = new A;
echo $t->x[1]->y;


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1999-03-24 09:31 UTC] rasmus
This is a known limitation in the object dereferencing code in PHP3 and will not be fixed until PHP4.  The
workaround is to dereference it in two steps like this:

$t = new A;
$tt = $t->x[1];
echo $tt->y; 
 [2011-05-16 17:34 UTC]
Automatic comment from SVN on behalf of dtajchreber
Log: Doc Bug #54751 missing default value in openssl_x509_export() - added default value for notext in signature
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Oct 04 11:01:25 2023 UTC