6

I know that my customers know PHP because i'm working on a PHP Tool (Running as a MFC Desktop Program)

Is it possible to embedd the PHP interpreter in a general purpose way like Python, Ruby, Lua or Javascript? And if yes - is it a hack or is there a clean solution.

4 Answers 4

1

Can you rewrite the language using PHP-GTK? That's how I make Win32 PHP apps.

If you're running .NET, then you need to check out Phlanager, and then the answer is definitely yes.

Finally, there's various PHP compilers that can compile PHP code into DLLs that your apps can use natively. see: http://phpcompiler.org/

Sign up to request clarification or add additional context in comments.

Comments

0

It appears the state of the art requires some hacking.

You can compile php from source, passing --enable-embed=[shared|static] to configure.

Evidently, that's not all that simple, but the facebook folks have evidently tried to improve it, creating phpembed

This slide deck from back in 2006 seems to have some interesting tidbits on working with the library created via --enable-embed

Comments

0

Potentially yes, although it is likely to be a hack.

Comments

0

There's also embeddable PHP runtime PH7 if you don't mind its GPL-like-or-commercial license.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.