Lua2Php is first released part of our set of tools for your web development toolbox and allows you to write in Lua for the PHP platform.
Currently it is released for Windows and Linux, but more platforms are planned.
Our Lua 5.0 compiler also has incorporated preprocessing capabilities easily accesible via compiler directives like in any other good compiler.
The Runtime Library
The compiler is accompanied by our port of many portions of the Lua RTL to the PHP platform, so many of your existing Lua code can be easily imported.
In any case, in your developments, feel free to use the Lua and PHP RTLs even in a mixed fashion. Yes, full freedom to get the best of both worlds ;)
Currently the following Lua RTL functions are available for this purpose (and more are under construction):
Basic
- assert
- require
- dofile
- error
- pcall
- rawequal
- rawget
- rawset
- tonumber
- tostring
- type
- string.byte
- string.char
- string.find
- string.len
- string.lower
- string.rep
- string.sub
- string.upper
- math.pi
- math.abs
- math.acos
- math.asin
- math.atan
- math.atan2
- math.ceil
- math.cos
- math.deg
- math.exp
- math.floor
- math.log
- math.log10
- math.max
- math.min
- math.pow
- math.rad
- math.sin
- math.sqrt
- math.tan
- math.random
- math.randomseed
- os.date
- os.difftime
- os.execute
- os.exit
- os.getenv
- os.remove
- os.rename
- os.setlocale
- os.time
- os.tmpname
- table.concat
- table.foreach
- table.foreachi
- table.getn
- table.sort
- table.insert
- table.remove
- table.setn