Image courtesy: www.diegosaletta.it
This article is not about technical comparison of PHP vs Java. For
technical comparison you can search/google/bing/duckduckgo "PHP vs
will consider 3 segments where "PHP vs Java" question can arise.(There
exist other segments also in software, but I don't think embedded system
programmer or rocket navigation system programmer would ponder over
"Java or PHP").
0) Mobile App:
If you are considering App only then use JAVA. PHP is no where in
picture in this area. There are 1.4 billion devices* in the world which
run android( java based) and 0 devices which run PHP.
1) Enterprise applications:
Java dominates the markets. Just choose any enterprise software and see
how many companies used Java vs PHP. e.g. : see how many open source
accounting software are in Java vs PHP.
2) High traffic consumer facing website:
Amazon, LinkedIn, Twitter, Ebay, Paypal, Google Ads, Salesforce and many more.
Wikipedia, Facebook( facebook uses hybrid form of PHP.), Yahoo( some part) and that is it.
3) normal consumer facing website:
Now this is the area where no clear consensus on winner.
let us drill down on this area a bit. Let us consider top reasons which
people consider when choosing one technology stack over others.
0) Familiarity with language: If you are familiar with only one of the language, then usually this point alone decides the choice. So no winner here.
1) Availability of free/open source frameworks/software
: Language itself is not as much important as the entire eco-system
that comes with the language. A better technology stack can increase
programmer productivity multiple times, which will translate to better
ROI( return on investment).
a sample comparison: If one sees list of Web framework available listed
on Wikipedia (
are 40 Java Framework listed vs 20 PHP framework. But most significant
issue here with PHP is that there is no new framework after 2012. Java
has 20 of them.
2) Availability of programmers for hiring:
There are 8 times more Java programmers as there are PHP programmers.
you can decide which will be easier to find.
3) Cost of Programmers: If
you consider only immediate cost then I think PHP will tough to beat.
But if consider mid-term to long-term ROI, then Java will emerge as
4) Training for new programmers:
PHP is considered easy to learn than Java. But in India where people
are more analytical bent , I don't think this point is valid. Soon India
will have 5 million programmers
5) Machine/Hardware Cost: Java has better scalability/security/machine affinity/efficiency than PHP, which translates into lower machine cost.
6) Maintenance of software for long term: Many big Indian internet companies I know have changed their technology stack from PHP to Java.
They have incurred major cost for this mainly because of increased complexity over time in PHP code base.
: If you are still undecided over "Java or PHP" or you have different
point of view, I would love to hear from you. You can comment here, or
write to firstname.lastname@example.org or tweet to
Let's Know your idea