|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11746 References to objects still doesn't work properly
Submitted: 2001-06-27 11:56 UTC Modified: 2001-06-27 13:17 UTC
From: zork at pablosoft dot com dot pl Assigned:
Status: Not a bug Package: Class/Object related
PHP Version: 4.0 Latest CVS (2001-06-27) OS: Linux 2.2.x
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: zork at pablosoft dot com dot pl
New email:
PHP Version: OS:


 [2001-06-27 11:56 UTC] zork at pablosoft dot com dot pl
When I want to set reference to $this obiect gets copied.

class CUI_element {
	var $value;
	function CUI_element($value) {
		global $ui_handler;
		$this -> value = $value;
		$ui_handler -> register($this);		

class CUI_handler {
	var $data;
	function CUI_handler() {
		$this -> data = false;
	function register(&$element) {
		$this -> data = &$element;

$ui_handler = new CUI_Handler();
$test = new CUI_Element("test");
$test -> value = "changed";


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-27 13:17 UTC]
submitted 3 times.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Oct 28 06:03:33 2021 UTC