Я пытаюсь сделать что-то вроде следующего:
// assume $f is an arg to the wrapping function
$self = $this;
$func = function() use($f, $ctx, $self){
$self->remove($func, $ctx); // I want $func to be a reference to this anon function
$args = func_get_args();
call_user_func_array($f, $args);
};
Можно ли ссылаться на функцию, назначенную $ func из той же функции?