Wasmer PHP

FuncType

Function types classify the signature of functions, mapping a vector of parameters to a vector of results. They are also used to classify the inputs and outputs of instructions.

Tags
todo

Fix example

<?php declare(strict_types=1);

use Wasm\Type\ValType;

$valtype = Type\ValType::new(Type\ValType::KIND_I32);
see
https://webassembly.github.io/spec/core/syntax/types.html#function-types

WebAssembly Specification - Function Types

Table of Contents

__construct()  : mixed
Create a Wasm\Type\FuncType from a `wasm_functype_t` resource.
asExternType()  : ExternType
inner()  : resource
Return the inner function type resource.
new()  : self
params()  : ValType
results()  : ValType

Methods

__construct()

Create a Wasm\Type\FuncType from a `wasm_functype_t` resource.

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

resource a wasm_functype_t resource

Tags
throws
InvalidArgumentException

If the $functype argument is not a valid wasm_functype_t resource

Return values
mixed

inner()

Return the inner function type resource.

public inner() : resource
Return values
resource

A wasm_functype_t resource

Search results