LuaClosure::__invoke
(PECL lua >=0.9.0)
LuaClosure::__invoke — luaclosure を起動
パラメータ
args
-
戻り値
例
例1 LuaClosure::__invoke()の例
<?php
$lua = new Lua();
$closure = $lua->eval(<<<CODE
return (function ()
print("hello world")
end)
CODE
);
$lua->call($closure);
$closure();
?>
上の例の出力は以下となります。
hello worldhello world
+add a note
User Contributed Notes
There are no user contributed notes for this page.
↑ and ↓ to navigate •
Enter to select •
Esc to close
Press Enter without
selection to search using Google