mirror of
https://github.com/php-win-ext/php-lua.git
synced 2026-03-24 17:12:16 +01:00
25 lines
506 B
PHP
25 lines
506 B
PHP
--TEST--
|
|
Bug #65097 (nApplyCount release missing)
|
|
--SKIPIF--
|
|
<?php
|
|
if (!extension_loaded("lua")) print "skip lua extension missing";
|
|
if (!extension_loaded("json")) print "skip json extension missing";
|
|
?>
|
|
--INI--
|
|
error_reporting=E_ALL&~E_STRICT
|
|
--FILE--
|
|
<?php
|
|
$lua = new Lua();
|
|
$lua->eval("
|
|
function main(x)
|
|
return nil
|
|
end");
|
|
$obj = array(1, 2, 3, array(4, 5, 6));
|
|
echo json_encode($obj) . "\n";
|
|
$lua->call('main', array($obj));
|
|
echo json_encode($obj) . "\n";
|
|
?>
|
|
--EXPECT--
|
|
[1,2,3,[4,5,6]]
|
|
[1,2,3,[4,5,6]]
|