Date: 05/24/01
- Next message: mail <email protected>: "[PHP-DEV] Bug #11093: Apache crashes when output buffering is used and fatal errors occure"
- Previous message: cardinal <email protected>: "[PHP-DEV] Bug #11059 Updated: PHP does not register GET variables $HTTP_GET_VARS is empty. POST works OK."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: sbergmann <email protected>
Operating system: should be OS independent
PHP version: 4.0.5
PHP Bug Type: Scripting Engine problem
Bug description: (Yet Another) References Weirdness
There seems to be a problem with objects returned from class methods by reference:
<?php
class a {
var $data;
function add_data($data) {
$this->data[] = $data;
}
}
class b {
var $a;
function &add_a() {
$this->a = new a;
return $this->a;
}
function dump() {
print_r($this->a->data);
}
}
$b = new b;
$a = $b->add_a();
$a->add_data('test'); // works not
$b->a->add_data('test'); // works
$b->dump();
?>
-- Edit Bug report at: http://bugs.php.net/?id=11092&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: mail <email protected>: "[PHP-DEV] Bug #11093: Apache crashes when output buffering is used and fatal errors occure"
- Previous message: cardinal <email protected>: "[PHP-DEV] Bug #11059 Updated: PHP does not register GET variables $HTTP_GET_VARS is empty. POST works OK."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

