Wasmer PHP

Func

Table of Contents

__construct()  : mixed
Create a Wasm\Module\Func from a `wasm_func_t` resource.
__invoke()  : Val
asExtern()  : Extern
inner()  : resource
Return the inner func resource.
new()  : self
paramArity()  : int
resultArity()  : int
type()  : FuncType

Methods

__construct()

Create a Wasm\Module\Func from a `wasm_func_t` resource.

public __construct( $func) : mixed
Parameters
$func :

resource a wasm_func_t resource

Tags
throws
InvalidArgumentException

If the $func argument is not a valid wasm_func_t resource

Return values
mixed

__invoke()

public __invoke([Val|null $args = null ]) : Val
Parameters
$args : Val|null = null
Return values
Val

inner()

Return the inner func resource.

public inner() : resource
Return values
resource

A wasm_func_t resource

new()

public static new(Store $store, FuncType $functype, callable $func) : self
Parameters
$store : Store
$functype : FuncType
$func : callable
Return values
self

paramArity()

public paramArity() : int
Return values
int

resultArity()

public resultArity() : int
Return values
int

Search results