Am 16.07.2011 13:23, schrieb Ferenc Kovacs:
> we have debug_zval_dump but it is hard to use correctly
Well, it's not a simple problem then is it? It wouldn't be too hard if
you understood the source of the problem...
> with weak references, you wouldn't need to worry about keeping a count
> of the refcount only check the valid() method.
yeah...a magic bullet is cool, but you could, to quote a contributor to
this list, shoot yourself in the foot;)
> for your last paragraph: that's totally unrelated to weak references,
> but you could achive what you want through memory_get_usage() +
You're right. It's related to one of the usecases of weak-references
though...and your proposition wouldn't works ince I'd have to check my
memory-usage all the time...that's what events are for.
> btw. if I remember correctly, somebody requested a non-fatal callback
> when memory limit is reached callback functionality, I have to look
> that up.
By then it's probably too late since I don't have any memory left to run
my cleanup code.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php