Lua::eval
(PECL lua >=0.9.0)
Lua::eval — 将字符串当做Lua代码执行
参数
-
statements
-
返回值
返回运行结果,参数错误返回null
,其它错误返回false
。
范例
示例 #1 Lua::eval()示例
<?php
$lua = new Lua();
$lua->eval(<<<CODE
print(2);
CODE
);
?>
以上例程会输出:
2

User Contributed Notes
There are no user contributed notes for this page.