Dragunov
Dragunov

Reputation: 985

Is using Lua in PHP feasible?

I would like to know whether it is feasible to use Lua code scripts in PHP, for a fairly critical and important web app.

What I would like to do is create scripts for different enviornments, so I don't have to write different PHP code for all of them.

Upvotes: 3

Views: 747

Answers (2)

aurora
aurora

Reputation: 9627

The only show-stopper could be the state of development of the used lua extension. I've played around a little bit with the one you can find here:

http://repo.or.cz/w/phplua.git

It seems to be still active developed. I've never used it in production though, because i always wondered if PHP is still the right tool for the backend, if scripting is required. But if you already have the backend developed and just want to add scripting, it's probably a good way to go ...

Upvotes: 1

user703016
user703016

Reputation: 37955

Feasible ? Yes. There are packages for that. http://pecl.php.net/package/lua.

Good idea ? I strongly doubt it. What can you do in Lua that you can't in PHP ?

Upvotes: 2

Related Questions