Is Quercus a viable replacement for PHP in Java environments?

前端 未结 5 731
梦毁少年i
梦毁少年i 2020-12-15 23:23

For anyone stumbling upon this question who doesn\'t know what Quercus is - it is an implementation of PHP done in Java.

For a project that I am currently working on

5条回答
  •  醉梦人生
    2020-12-15 23:25

    I did a little work evaluating Quercus and it looked promising, but did not work with the project I was working on, as it was Symfony based and the reflective nature of Symfony was not well handled by Quercus.

    I did try getting a number of open source PHP projects working with it and found it to have a fairly complete PHP5 based API.

    You should be able to get it working with Jetty. I was able to get it working with Tomcat.

    You can really think of it as a replacement for JSP in a Java app. The way it works parallels how JSP works in that you compile PHP to Java code, just as you'd compile JSP to Java code.

    I believe the big disadvantage of going with Jetty would be the inability to precompile the PHP code.

    There are quite a few advantages, though, even if you aren't mixing PHP with Java. If you are mixing the two, you have even more advantages.

提交回复
热议问题