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

Reply via email to