Mixing PHP and Java does a few things:
- You lose the benefit of the tight integration between PHP and MySQL, as Java will fit in the middle (with probably lots of complex spaghetti code).
- You introduce a complex Controller layer between the PHP View and the Java Model, which could be easily handled by leveraging open source MVC projects such as Spring MVC or Struts 2.
- You create a larger barrier for new
developers who are introduced to the
code, since they will have to learn
both programming languages.
I, personally, advocate the Struts 2 MVC architecture, with Spring integration to handle your data access using Hibernate or IBatis, or to whatever service/backend you may be connecting your model layer to.
If you are tied to PHP, I would suggest sticking with pure PHP and MySQL, since you have an entire community to help with troubleshooting, support, and technical help when you are looking for other developers to join the project.