PHP 8.5.0 Alpha 2 available for testing

LuaClosure::__invoke

(PECL lua >=0.9.0)

LuaClosure::__invokeInvoke luaclosure

Descripción

public LuaClosure::__invoke(mixed ...$args): void

Advertencia

Esta función está actualmente no documentada; solo la lista de sus argumentos está disponible.

Parámetros

args

Valores devueltos

Ejemplos

Ejemplo #1 Ejemplo de LuaClosure::__invoke()

<?php
$lua
= new Lua();
$closure = $lua->eval(<<<CODE
return (function ()
print("hello world")
end)
CODE
);

$lua->call($closure);
$closure();
?>

El ejemplo anterior mostrará :

hello worldhello world
add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top