The IBM developerWorks site has this new tutorial posted showing how to combine two different languages, PHP and Jave, with the help of the Java bridge in the WebSphere sMash environment.
The WebSphere sMash environment enables rapid development of interactive Web applications based on popular Web technologies such as PHP, and it lets you reuse existing Java assets from PHP scripts. This article introduces the Java Bridge and shows how to access Java classes from PHP.
They create a sample project to work with in sMash and show how to implement and create a new the Java object that automatically loads and makes available to PHP the functionality inside. They look at accessing static methods and fields, catching exceptions, type conversion, and working with SQL connections.