(PECL lua >=0.9.0)
Lua::assign — 锟斤拷一锟斤拷php锟斤拷锟斤拷锟斤拷值锟斤拷Lua
锟斤拷锟斤拷锟斤拷锟斤拷未锟斤拷写锟侥碉拷锟斤拷锟斤拷锟叫诧拷锟斤拷锟叫憋拷
name
value
锟斤拷值锟缴癸拷锟斤拷锟斤拷$this锟斤拷锟津返伙拷NULL
Example #1 Lua::assign()示锟斤拷
<?php
$lua = new Lua();
$lua->assign("php_var", array(1=>1, 2, 3)); //lua table index begin with 1
$lua->eval(<<<CODE
print(php_var);
CODE
);
?>
锟斤拷锟斤拷锟斤拷锟教伙拷锟斤拷锟斤拷锟�
Array ( [1] => 1 [2] => 2 [3] => 3 )