أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
Apache, Tomcat
PHP is an opensource and free server side language. It has full package (PHP + Mysql + Linux) and all are free and opensource. That's is reason its hosting is very cheap than others. In case of other languages no one software is free. You have to buy oracle licence etc that's why its package is expensive than PHP.
Developing Java based server requires purchasable softwares making it expensive to use in hosting a web applications compared to PHP where softwares are free to download hence relatively cheaper.
I agree with Muhammad Majid Saleem that when you develop Java based server you have to purchase server softwares whereas while doing the same for PHP based server softwares are open source and free to download.
Also the developer for Java are also costly compared to PHP developer which are much more in number that Java.