I’ve tried a few options for running PHP in a desktop environment including WinBinder and PHP-GTK. GTK is probably the best choice, and it’s really a great library; but when it comes to deploying an application, it leaves something to be desired. What you can do is put PHP in a folder with the application and create a batch file to run your script. Then, you can bundle the whole thing in a self-extracting zip with WinZip. This can work, but it’s really not an elegant solution.
The other downside to GTK is that you cannot use web development techniques in your applications, which makes it a little limiting for people who are used to working on a server. The solution to all of this is a project I accidentally found on Stack Overflow called PHP Desktop. This is just what I’ve been looking for: a compact web server with a browser frontend which can be bundled into a Windows executable. Somebody finally got it right.
The server is Mongoose and the browser engine is IE10. The JavaScript execution seems fast, and you can use your favorite JS library\framework. You can really use all your normal web dev skills with it, but so far, I’ve found that the following does not work:
- HTML5 elements such as header, footer, article, etc. They show up fine, but you can’t select them with CSS
- HTML5 form features
- CSS attribute selectors
- I tried to set up an infinite loop in php and it alternated between blowing up and just not working
I’m almost done building an application in this runtime and I’m going to try bundling it up for install with iexpress. More details to come.