RE: [PHP-DEV] new Class ReflectionZVal

From: Date: Mon, 07 Jan 2013 19:07:22 +0000
Subject: RE: [PHP-DEV] new Class ReflectionZVal
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-64647@lists.php.net to get a copy of this message
On Mon, 7 Jan 2013, nathan@starin.biz wrote: > From: Derick Rethans [mailto:derick@php.net] > Sent: Monday, January 07, 2013 11:22 AM > > > On Mon, 7 Jan 2013, nathan@starin.biz wrote: > > > > > function __construct(&$variable); > > > > That's inherently flawed, as passing a variable in can modify it's > > refcount and is_ref states. This is why Xdebug's equivalent wants a > > string > > with the variable name instead: > > http://xdebug.org/docs/all_functions#xdebug_debug_zval > > I am quite familiar with this issue. The idea I was thinking to solve that > issue is to maybe pass by-reference to the __construct. It won't, as you might actually end up splitting the reference. You *cannot* pass in a variable, either by-ref or by-value for this to work. > When I was drafting this first email I had it by-ref, but opted out of > it because I didn't have a way to get the value of the reference, but > reviewing I added the " function getValueReflection();" functions > which should make it possible to use by-reference now and obtain the > info to the reference of the reference. There is no such thing as a reference of a reference. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consider a donation: http://xdebug.org/donate.php twitter: @derickr and @xdebug Posted with an email client that doesn't mangle email: alpine

« previous php.internals (#64647) next »