php-lua
php-lua copied to clipboard
This extension embeds the lua interpreter and offers an OO-API to lua variables and functions.
Please?
MacOS has different lib path for liblua. This PR adds /usr/local/lib to the list of paths where it looks for it
当前的lua扩展有一个很大的问题:把一个PHP方法registerCallback给lua之后,如果lua调用这个方法出现php的异常,lua的代码还是会继续往下走,示例: ``` $lua->registerCallback("test", function() { throw new \Exception("test"); }); $lua->eval(
在新版本的lua中已经可以区分integer和double了,这就可以解决扩展统一把lua的number类型转换成php的double的问题 ``` $lua->eval("a=2"); // old gettype($lua->a); // double // new gettype($lua->a); // integer ```
Static methods like Lua::getVersion shouldn't use ZEND_ACC_ALLOW_STATIC but most likely use ZEND_ACC_STATIC. This PR addresses the issue (which otherwise blocks compilation against PHP8)
php 5.5.38 + apache (using phpStudy Enviroment) I tested php_lua-2.0.5-7.2-nts-vc15-x86, and it works very well on php php-7.2.10-nts. And there is nothing related lua inside phpinfo.php. Have you ever test...
When lua print a table data structure, php script get segment fault gdb bt: #0 0x00007fa952d91a67 in ?? () from /usr/lib64/liblua-5.1.so #1 0x00007fa952d8489c in lua_next () from /usr/lib64/liblua-5.1.so #2 0x00007fa952fad835...
When i call lua function with use_self=True, i got this error: call to lua function attempt to call a table value failed php code example: $lua = new Lua(); $lua->include('battleEntryServer/BattleEntry.lua');...