Lua::call

Lua::__call

(PECL lua >=0.9.0)

Lua::call -- Lua::__call锟斤拷锟斤拷Lua锟斤拷锟斤拷

说锟斤拷

public Lua::call ( callable $lua_func [, array $args [, int $use_self = 0 ]] ) : mixed
public Lua::__call ( callable $lua_func [, array $args [, int $use_self = 0 ]] ) : mixed

Warning

锟斤拷锟斤拷锟斤拷锟斤拷未锟斤拷写锟侥碉拷锟斤拷锟斤拷锟叫诧拷锟斤拷锟叫憋拷

锟斤拷锟斤拷

lua_func

lua锟叫的猴拷锟斤拷锟斤拷锟斤拷

args

锟斤拷Lua锟斤拷锟斤拷锟斤拷锟斤拷牟锟斤拷锟斤拷锟�

use_self

锟角凤拷使锟斤拷self锟斤拷

锟斤拷锟斤拷值

锟斤拷锟截碉拷锟矫猴拷锟斤拷锟侥斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷蠓祷锟�NULL 锟斤拷锟斤拷锟斤拷锟斤拷锟襟返伙拷FALSE锟斤拷

锟斤拷锟斤拷

Example #1 Lua::call()示锟斤拷

<?php
$lua 
= new Lua();
$lua->eval(<<<CODE
    function dummy(foo, bar)
        print(foo, ",", bar)
    end
CODE
);
$lua->call("dummy", array("Lua""geiliable\n"));
$lua->dummy("Lua""geiliable"); // __call()
var_dump($lua->call(array("table""concat"), array(array(1=>12=>23=>3), "-")));
?>

锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�

Lua,geiliable
Lua,geiliable
string(5) "1-2-3"

锟轿硷拷