开发者

PHP as embedded scripting language

I have gotten Lua scripting in C# working via LuaInterface,开发者_如何学编程 and javascript scripting working via JInt. The goal is to support a wide variety of scripting language options. Is there any similar method to run embedded PHP scripts in a similar way?

I.E., have a PHP script in a string, pass it to either the PHP command line or an interpreter of sorts, and capture the output (Ideally being able to hook in to .NET methods).

Looked at IronPHP, but that doesn't seem to have gotten anywhere. Also looked at Phalanger, but am not sure if it can accomplish this. It seems to be more along the lines of "Compile PHP to .NET bytecode".


I've never heard of anyone embedding PHP into an application and exposing internal methods to scripts in that way. Lua is designed for this use case as was Tcl, and JavaScript has traction there as well. I'd recommend dropping PHP as the effort required is probably not worth it. Python would be a good language to try next.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜