pub fn wrap_once<T>(func: T) -> Self
    where
        T: PhpOnceClosure + 'static,
    {
        func.into_closure()
    }
Wraps a [`FnOnce`] Rust closure into a type which can be returned to
PHP. If the closure is called more than once from PHP, an exception
is thrown.

The closure can accept up to 8 arguments which implement [`IntoZval`],
and can return any type which implements [`FromZval`]. The closure
must have a static lifetime, so cannot reference `self`.

# Parameters

* `func` - The closure to wrap. Should be boxed in the form `Box<dyn
FnOnce(...) -> ...>`.

# Example

```rust,no_run
use ext_php_rs::closure::Closure;

let name: String = "Hello world".into();
let closure = Closure::wrap_once(Box::new(|| {
name
}) as Box<dyn FnOnce() -> String>);
```
src/closure.rs