Re: [PHP] Detecting Multi-Scope Variables

2011-02-01 Thread David Harkness
I think you can use reflection [1] to block the hooks from using & in their parameter lists. This way the clients must use & to pass a reference. This is definitely possible for function/method callbacks [2], but I'm not sure about 5.3 closures [3]. David [1] http://www.php.net/manual/en/reflecti

Re: [PHP] Detecting Multi-Scope Variables

2011-02-01 Thread Brad Lorge
Hmm, would this then be a question for internals? On Wed, Feb 2, 2011 at 9:59 AM, Ashley Sheridan wrote: > "Brad Lorge" wrote: > > >Perhaps my question was not as succinct as it could have been. > > > >Basically, can you think of a means through which to detect whether or > >not a > >variable i

Re: [PHP] Detecting Multi-Scope Variables

2011-02-01 Thread Ashley Sheridan
"Brad Lorge" wrote: >Perhaps my question was not as succinct as it could have been. > >Basically, can you think of a means through which to detect whether or >not a >variable is currently present in multiple scopes. > >IE: > > >$bob = "fish"; > >echo is_multiscoped($bob); //False > >function some

Re: [PHP] Detecting Multi-Scope Variables

2011-02-01 Thread Brad Lorge
Perhaps my question was not as succinct as it could have been. Basically, can you think of a means through which to detect whether or not a variable is currently present in multiple scopes. IE: On Tue, Feb 1, 2011 at 7:12 PM, Tommy Pham wrote: > > -Original Message- > > From: Brad Lo

RE: [PHP] Detecting Multi-Scope Variables

2011-02-01 Thread Tommy Pham
> -Original Message- > From: Brad Lorge [mailto:b...@lorge.com.au] > Sent: Monday, January 31, 2011 9:53 PM > To: php-general@lists.php.net > Subject: [PHP] Detecting Multi-Scope Variables > > Hello All, > > I am new to the list so please be gentle :) > > I am working on a PHP framework