extension to run Lua 5.1 code from PHP
LuaSandbox Documentation

LuaSandbox is an extension for PHP 5, PHP 7, and HHVM to allow running Lua 5.1 code from within PHP, which will generally be faster than shelling out to a Lua binary and using inter-process communication.

For more details see