Mixing Lua and PHP?

I really want to mix Lua and PHP, for example, receive a PHP request and process some parts of the request using Lua scripts (called from the PHP script that received the original request).

Any clues about this? I saw how some libraries used Lua as some kind of replacement for PHP, but I did not see anything clear about how to use Lua and PHP together.

thank

+3
source share
3 answers

Have you seen phplua ? It looks like he can do what you want. I found it through the Lua binding-with-other-languages ​​page (it was the only suitable option, for better or for worse).

+7
source

I assume that you do not want to embed lua in PHP, which runs lua as an external script and reads the result. This is a fairly common operation and this page contains some recommendations.

+3
source

Source: https://habr.com/ru/post/1791916/


All Articles