Re: Detecting Multi-Scope Variables

From: Date: Tue, 01 Feb 2011 23:27:04 +0000
Subject: Re: Detecting Multi-Scope Variables
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-311127@lists.php.net to get a copy of this message
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/reflectionparameter.ispassedbyreference.php [2] http://www.php.net/manual/en/language.pseudo-types.php#language.types.callback [3] http://www.php.net/manual/en/functions.anonymous.php

« previous php.general (#311127) next »