PHP on Windows


Sydney Harbour Bridge

Do you use PHP on Windows?

Love to hear your stories. Comment here or email me at nhodge@microsoft.com and I will send you a special postcard from Australia!

Comments (1)

  1. Hey, postcards from Australia, neat! Don’t know if my story is inspiring enough, though.

    Before I became a web developer, I was doing mainly Windows desktop apps in C++ and some odd Delphi projects. There was a weird transition period when I started including PHP interpreters into desktop projects to make them scriptable, especially the support of legacy projects became a lot easier this way. This was mainly because my colleagues had left me some real monsters that would only compile on special days and possibly required animal sacrifices to work at all. Ah, good times. 😉

    A few years ago I had this late epiphany when I realized pretty much any business app we had could be done with the browser-based model, which had a LOT of benefits. The first year or so I didn’t really believe in script languages and dicked around with compiled CGI executables. In time, however, I really started to see the PHP light. I still think the syntax is ugly, by the way, but the sheer power and speed of development finally won me over. Granted, it took a while to figure out how to not make a mess out of larger projects because PHP conceptually requires a large amount discipline.

    So, in the last five years or so I would have a web server plus PHP/MySQL stack on all of my computers, for development and testing. Those were all Windows machines. In time I gave up on installing and tweaking everything myself and turned to XAMPP, which provides a kickass package for all major platforms.

    I liked that PHP on Windows kind of abstracted away the OS differences, even though some things sadly weren’t supported on Win32. I still think a valid strategy for providing offline web apps is installing a local server stack on client machines, by the way. Especially after seeing and experiencing the awkwardness of Google Gears 😉

    When I bought my second Mac laptop two years ago, Windows started to grow more distant to me, both as an everyday user and as an app developer. Company servers here in Germany are typically Linux or Unix, and my new place of work is all Mac on the client side. So for me, the PHP on Windows story pretty much ended when I finally replaced my aging desktop PC with a Mac Pro.

    I already pointed out where PHP as a language on client computers could be valuable. There are some things it’s really not suited for. PHP’s strength lies in the per-request execution model, it has not been as successful in scenarios requiring persistence, like actual desktop applications. Right now, Ruby seems like a good candidate for scripting languages that would, say, profit from Windows Forms bindings. On the other hand, maybe PHP does pretty well as a full .NET CLR language in the Windows world afterall, I haven’t really tried that out.