Date: 08/27/98
- Next message: shane: "[PHP-DEV] CVS update: php31/ext/ldap"
- Previous message: z-kimmel <email protected>: "[PHP-DEV] Bug #700: class constructors cause PHP to crash"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: z-kimmel <email protected>
Operating system: NT
PHP version: 3.0.3
PHP Bug Type: Parser error
Bug description:
Object references appear to change every time a change is made to the object, at least under NT. This means that you can't store mutable objects inside an array, for example. This is bad!
<?php
class example {
var $a;
function test() {
$temp=$this;
$this->a=10;
return $temp;
}
}
$c = new example;
$c->a=1;
$result=$c->test();
print($result->a);
# prints out the number 1, not the number 10!!
?>
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: shane: "[PHP-DEV] CVS update: php31/ext/ldap"
- Previous message: z-kimmel <email protected>: "[PHP-DEV] Bug #700: class constructors cause PHP to crash"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

