Programming Languages Used By Large Companies – PHP vs. Java

Some people try to bash PHP and explain how building high-scale platforms work.

Since that’s a bit biased, I’ll try to outline a different perspective – as a certified Java programmer who currently runs an agency with PHP developers.

In terms of “website developers”, there is no clear statistics since a good chunk of developers don’t engage in surveys and don’t necessarily follow industry blogs and magazines running those.

Based on two different attempts to gather that number back in 2012–2013:

Oracle says it’s 9,000,000. Wikipedia claims it’s 10,000,000. And the guys from Numbers Archives – A Knowledge Archive seem to be the most precise – they know that there are exactly 9,007,346 Java developers out there.

This was gathered from Plumbr.

With more than 5 million PHP programmers active globally, the demand for PHP remains strong and is on track for further growth. This is second only to Java, the most popular platform for the enterprise, which currently has about 9 million developers worldwide.

That’s straight out of Zend’s report and conveniently mentions Java as well.

Now, it’s worth noting that Java is a multipurpose programming language that leads the development of Android applications (and J2ME apps back in the day), could be used for desktop applications, server development, web services, embedded development, and whatnot.

Web Developers

So it’s not unlikely that the number of Java and PHP web developers is approximately the same.

If you browse for additional statistics, you’ll find that PHP is used by 83.1% of all the websites whose server-side programming language we know.

But it’s also important to understand that the majority of the web is comprised of blogs, small business websites, hobbyist magazines and other non-crucial pet projects.

A good exercise to understand the landscape is reading Programming languages used in most popular websites – Wikipedia which outlines what full-time developers use in some of the top websites out there.

Programming Languages Used By Large Companies - PHP vs. Java
A Screengrab from Wikipedia

You will see that Java is widely used by Google, YouTube, Amazon, Twitter and many more. But among the most visited websites, you will find Facebook, Yahoo, Wikipedia and WordPress.com that rely on PHP.

Java Is Preferred By Enterprises

Engineers may argue a lot about which one is better despite the numbers. Java is generally preferred by enterprises and large corporations – although you can find a number of other programming languages used by others.

But Java is clearly an overkill for small projects.

When I switched to PHP, I had spent 8 months building a CMS on top of JavaServer Faces and I wanted to use it for freelancing and ongoing development.

Why I Gave Up Two Weeks Later?

PHP vs. Java

  • Java is generally heavier and slower than PHP for smaller projects (consumes more resources and allocates a ton of stuff while bootstrapping a simple app).
  • Almost all hosting vendors back then supported PHP and just a handful did that for Java. Java hosting plans were generally 4–6 times more expensive (for seemingly the same expected output).
  • Many simple applications required a blog, a gallery, a forum connected to their website back then. There was WordPress (before becoming a CMS), Gallery2, phpBB/vBulletin that people knew very well and ran on PHP.
  • Finding freelance jobs for PHP was significantly easier (for me) than Java. Most companies looking for Java developers were only hiring full-time people or contractors for 6–9 month projects (due to the specifics and volume of a traditional Java application).
  • Since Java is more verbose, plenty of simple activities required setting up XML configuration files, additional classes for Hibernate connections or sifting through complex components dynamically generating AJAX callbacks or simple dropdown menus. Sure, there are workarounds – but it was definitely taking significantly longer for simple activities.

This is essentially how I switched to PHP when I became a full-time freelancer and kept training technical courses in Java. Demand was different depending on the niche/industry and opportunities were different as well.

Both programming languages used often are great in certain areas. But quantifying numbers and generalizing is counterproductive – hence my attempt to showcase some specific stats and use cases.