I am not familiar with the term: "zval"...My understanding of php comes
from extensive usage...Can you give me a specific example?
OK, sorry, got a bit into engine-speak, basically zval is the internal
representation of a variable, more or less, though $foo and $bar can be
linked to the same z
Hi,
To get an understanding of zval's and php internal basics, I recommend
you read the following tutorials:
http://devzone.zend.com/node/view/id/1021 - Part I: Introduction to PHP
and Zend
http://devzone.zend.com/node/view/id/1022 - Part II: Parameters, Arrays,
and ZVALs
http://devzone.zend
That's correct. However, it is not guaranteed that your unset would
delete last reference - there can be references on stack, in temp
variables in current expressions being calculated (function call could
happen in mid-expression), etc. Of course, it might be that your code
is very controlled
On 21 jan 2007 Lars Schultz wrote:
> >Perhaps you could use your own reference counting?
> >Keep your "real" objects in private array and instead of returning them
> > return a simple object which would forward all methods and properties by
> > __get/__set/__call. The constructor would increase you
Note that the engine does not guarantee you any particular value of
the refcount. Passing parameters around, accessing variables, etc. may
change the refcount. One thing the engine guarantees you is that once
no links to the variable exist it would be destroyed (which may not
happen immediate
Perhaps you could use your own reference counting?
Keep your "real" objects in private array and instead of returning them return
a simple object which would forward all methods and properties by
__get/__set/__call. The constructor would increase your internal refcount by
one, destructor woul
Lars Schultz wrote:
> I know that a lot of you may say: Why do need to do that?...and I'd have
> to think for 3 days and then write for 4 days and would give up. It
> seems like a nice solution to me and if any of you have an idea as to
> how I could implement this differently, please feel free to
As you can see I boldly used the function reference_count(Object) even
though it doesn't exist. This is exactly what I'd need to allow my
concept to work. I keep thinking of any other solutions, but up until
now, I didn't find any better solution for this problem. Of course I can
Note that th