Bug in current Object Model

From: Date: Wed, 13 Feb 2002 01:38:36 +0000
Subject: Bug in current Object Model
Groups: php.dev 
Request: Send a blank email to php-dev+get-79996@lists.php.net to get a copy of this message
Zeev, Andi It appears that the bug we talked about in private correspondence does not just apply to object overloading. It appears to apply to normal objects as well. Consider the following code: class test { var $dummy; function do_something() { print "Hello\n"; } } $obj=new test(); debug_zval_dump($obj); $obj->do_something(); debug_zval_dump($obj); This will produce the following output: object(test)(1) refcount(2){ ["dummy"]=> long(1) refcount(2) } Hello object(test)(1) refcount(1){ ["dummy"]=> long(1) refcount(3) } ZEND_SEND_VAR is the opcode that does this in this scenario as well -jason -- Jason T. Greene Internet Software Engineer <jason@inetgurus.net> <jason@php.net> <jason.greene@tdstelecom.com> Use PHP: http://www.php.net

« previous php.dev (#79996) next »