You are here

Quercus

Keywords: 

I've known about being able to run PHP under Java for a while now, but I've been a bit skeptical about how well it would actually run real PHP code.

Well, I've found out: really well. I've installed http://quercus.caucho.com/ on my Tomcat-6 server and run some of my simpler PHP5 stuff on it. It runs well, but not as fast as I was expecting (i.e. slower than Zend PHP5, for filesystem access at least). I suspect this is due to not having Resin Pro and thus not able to cache compiled PHP scripts. Maybe.

But it's certainly got my interest. I like Java a lot, but my main line of work is in PHP5 so I'm totally out of practise and well behind on the state of the art in Java (or even whatever was current 5 years ago..). Using the ability of Quercus to run Java within PHP5[1] I might look at rewriting some of my more time consuming PHP functions - something like what I used to do with C and assembler long, long ago - except that Java is more capable and faster, while assembler is faster but leaves you totally on your own when it comes to features.

As an aside, to get it to run on Tomcat ignore the web.xml on the Quercus website. Take the web.xml out of the downloadable quercus-3.x.x.war.

[1] I know about the PHP/Java bridge, but I never seem to have the right version of PHP to get it to compile...