pub unsafe trait PhpClosure {
// Required method
fn invoke<'a>(&'a mut self, parser: ArgParser<'a, '_>, ret: &mut Zval);
}Available on crate feature
closure only.Expand description
Implemented on types which can be used as PHP closures.
Types must implement the invoke function which will be called when the
closure is called from PHP. Arguments must be parsed from the
ExecuteData and the return value is returned through the Zval.
This trait is automatically implemented on functions with up to 8 parameters.