well, you're an hobbyist, as you said. An I'm sure php is the best thing for you.
But I think if you were in the need to write N-tier stuff, to integrate legacy systems and so on.. I dont think you should go with php.
But, sure, you can.
Most people gets java ad hard. It may be harder than PHP in the first time, it is not in the long run. When someone first see EJB's xml think 'oh no! I have to write xml!" and doesn't get that xml is saving him the need to write sql and a whole persistence layer :)