Java
Java

18.7K
3.2K
15.2K
PHP
PHP

25.3K
4.3K
5.4K
Add tool

Java vs PHP: What are the differences?

Java: A concurrent, class-based, object-oriented, language specifically designed to have as few implementation dependencies as possible. Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!; PHP: A popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

Java and PHP can be primarily classified as "Languages" tools.

"Great libraries", "Widely used" and "Excellent tooling" are the key factors why developers consider Java; whereas "Large community", "Open source" and "Easy deployment" are the primary reasons why PHP is favored.

PHP is an open source tool with 23.9K GitHub stars and 5.53K GitHub forks. Here's a link to PHP's open source repository on GitHub.

9GAG, Hootsuite, and 37 Signals are some of the popular companies that use PHP, whereas Java is used by Airbnb, Uber Technologies, and Spotify. PHP has a broader approval, being mentioned in 8904 company stacks & 2933 developers stacks; compared to Java, which is listed in 2399 company stacks and 2723 developer stacks.

- No public GitHub repository available -

What is Java?

Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable. From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!

What is PHP?

Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.

Want advice about which of these to choose?Ask the StackShare community!

Why do developers choose Java?
Why do developers choose PHP?
What are the cons of using Java?
What are the cons of using PHP?
What companies use Java?
What companies use PHP?
What are some alternatives to Java and PHP?
C
Abstract
Abstract builds upon and extends the stable technology of Git to host and manage your work.
Go
Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.
Python
Python is a general purpose programming language created by Guido Van Rossum. Python is most praised for its elegant syntax and readable code, if you are just beginning your programming career python suits you best.
Scala
Scala is an acronym for “Scalable Language”. This means that Scala grows with you. You can play with it by typing one-line expressions and observing the results. But you can also rely on it for large mission critical systems, as many companies, including Twitter, LinkedIn, or Intel do. To some, Scala feels like a scripting language. Its syntax is concise and low ceremony; its types get out of the way because the compiler can infer them.
See all alternatives
What tools integrate with Java?
What tools integrate with PHP?
Decisions about Java and PHP
No stack decisions found
Interest over time
Reviews of Java and PHP
Review ofPHPPHP

source: w3techs.com

Rants about PHP are everywhere, but during the last years the language and the whole ecosystem has evolved.

The lastest versions support namespaces, closures, traits, generators and with composer a dependency manager that changed the way PHP developers work and collaborate.

How developers use Java and PHP
Avatar of Brian Fults
Brian Fults uses JavaJava

Pretty much everything - Java is reasonably fast, reasonably safe, and reasonably expressive. I wouldn't call it the best at any of those things. The real advantage to me is that the virtual machine is ubiquitous and many people can understand it. Since I have the most experience in this language, it's my tool of choice for most projects.

I've also been learning JavaFx so that I can build user interfaces without the web. I've started several single-page-application projects that worked, but felt like workarounds or hacks and would be better-served as self-contained applications.

Avatar of denkbar.io
denkbar.io uses JavaJava

Do I really need to explain? Well to me, the most appealing factor in Java besides the unbelievable community and vast array of available libraries, is just the amount of effort that has been put in the modern JVM. Decades of optimization and improvements have lead to a terrific piece of technology. I admire the people contributed to that.

Avatar of Vladislav Moshynec
Vladislav Moshynec uses PHPPHP

Use the ipwhois.io IP lookup API to quickly and simply integrate IP geolocation into your script or website. Save yourself the hassle of setting up local GeoIP libraries and having to remember to regularly update the data.

GitHub

Avatar of ShadowICT
ShadowICT uses PHPPHP

We use PHP as our main backend preprocessor. Being a well established language, it is supported by a large community as well as a dedicated team of developers. It is used for much heavier projects that do not require realtime processes as well as being used in a hybrid system alongside NodeJS.

Avatar of Andrew Gatenby
Andrew Gatenby uses PHPPHP

PHP has been the backbone of what we've done at Visualsoft for years. We have lots of experienced people who have used it and know how to get the best out of it. It's come on leaps and bounds over recent years, and is the basis of pretty much everything we'll build with.

Avatar of Scrayos UG (haftungsbeschränkt)
Scrayos UG (haftungsbeschränkt) uses JavaJava

Shouldn't surprise anyone, as minecraft is also java-based. Java is used for much more than just the plugins though. JCVortex (our API) is also served with vert.x (Java) and many of our team-internal tools also originated from java or are still java-applications.

Avatar of Ordius IT Solutions Pvt Ltd
Ordius IT Solutions Pvt Ltd uses PHPPHP

The reason being they are simple to learn and easy to implement apps on any size.

The learning curve for PHP and MySQL is less compared to MEAN. It’s advisable to learn PHP and MySQL if you want to have a taste of web-development or you are in a hurry.

Avatar of IPWHOIS.io - IP Geolocation API
IPWHOIS.io - IP Geolocation API uses PHPPHP

Use the ipwhois.io IP lookup API to quickly and simply integrate IP geolocation into your script or website. Save yourself the hassle of setting up local GeoIP libraries and having to remember to regularly update the data.

Avatar of Web Dreams
Web Dreams uses JavaJava

The most popular language in the world, definitely every programmer would use the Java language at some point. Frankly, I only use java when it’s a must. I find the language to be a little bit tedious when working with it.

Avatar of brenoinojosa
brenoinojosa uses JavaJava

bytelore.com makes extensive use of Java in its applications. We use Java due to its performance, community and the number of other projects built in the language. We have many projects and libraries built in Java.

How much does Java cost?
How much does PHP cost?
Pricing unavailable
Pricing unavailable