Follow these steps :
1. Download and install JBoss AS 5.1 , for more details click here.
2. Download the Caucho Quercus PHP 4.0.11, for more details click here.
3. Extract the contents of quercus-4.0.11.war to a folder named myphp then copy this folder at %jboss5path%/server/default/deploy
4. Run JBoss, using run.sh or run.bat
5. Open your web browser then browse, http://localhost:8080/myphp
Well, if you see the Resin Quercus page, you have successfully deployed it.