DESCRIPTION¶
Evaluates the closure. The extra args will be passed as args to the closure. If cl is not a closure, it will simply be returned.
USAGE¶
mixed eval(object ob, string func, mixed *args)
{
return funcall(#'call_other, ob, func, args);
}
This will result in calling:
ob->func(args).
In combination with the ‘...’ operator, the functionality of apply
(E) can be implemented:
mixed eval(object ob, string func, mixed *args)
{
return funcall(#'call_other, ob, func, args...);
}
will result in calling:
ob->func(args[0],args[1],...,args[sizeof(args)-1])
HISTORY¶
- introduced (3.2@70)
- changed (3.2.1) – returns a non-closure unchanged even when args are given.