On Mon, 7 Jan 2013, nat...@starin.biz wrote:

> From: Derick Rethans [mailto:der...@php.net] 
> Sent: Monday, January 07, 2013 11:22 AM
> 
> > On Mon, 7 Jan 2013, nat...@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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to