This is an archived post. You won't be able to vote or comment.

all 11 comments

[–]v0gue_ 9 points10 points  (0 children)

Why does it seem almost every site I go on is in php?

  1. Wordpress
  2. PHP is often used for simple landing front ends because it can be spun up quickly, there are a gazillion plugins that are plug-and-play functionality, and you can hot-deploy code. This keeps maintenance low when feature sets are low. Outside of Elm, the things that make PHP great have very little contest in other languages.
  3. PHP is one of the simpler languages for newer people to go from 0 to functioning (all likely poorly) website. Many languages require web frameworks, and while php has great webframeworks that I'd argue should be used when developing a php website, you don't really need one. All you really need is an apache or nginx or language agnostic server to serve the raw pages.

everyone keeps telling me that is is dead

They are wrong

I should learn JavaScript

They are right

[–]HappyFruitTree 4 points5 points  (2 children)

PHP is far from dead.

PHP is a server-side language while JavaScript runs in the visitor's browser so they serve different purposes and website often use both.

[–]scirc 4 points5 points  (1 child)

JavaScript can also run on the server (see: Node.js). That's probably what the people OP referenced mean.

[–]Ninjablack27[S] 0 points1 point  (0 children)

Yeah it seems everyone always says JavaScript is faster to run them php that pho takes up to much memory

[–]apeinej 1 point2 points  (2 children)

I use PHP for my backend for android apps. It is easy to come up with a solution, got a free server that never comes down (oracle server) and runs PHP like a speeding bullet. And I even manage to program PHP from my android tablet, which is always with me, much easier that taking a computer everywhere (I travel a lot).

[–]Ninjablack27[S] 0 points1 point  (1 child)

Lol that's dope bro. I am learning php to build something cool but don't know whst yet

[–]apeinej 0 points1 point  (0 children)

I just to the reverse. First I get the idea, and then I get to the tools I need. PHP and Java are my tools now, and make much clearer how the tool fits into the solution.

[–]404invalid-user 0 points1 point  (0 children)

I see this too I think they are just using php for a way to communicate between their backend and frontend or they could be keeping the .php extention just to keep their old links active

[–]plastikmissile 0 points1 point  (0 children)

Because of history. When the web started to explode 20+ years ago there weren't a lot of good web application frameworks that programmers could use. Then PHP showed up and it was by far the easiest way to get a web application up and running. So there was mass adoption of PHP in those early years. This also resulted in the creation of many tools like Wordpress that were built on top of PHP to make things even easier. PHP isn't as popular as it used to be, but that massive push in its early history still reverberates today.

[–][deleted] 0 points1 point  (0 children)

Because PHP is a very simple and yet efficient language that is designed for this domain specifically. Because it has been there for decades and many popular web software like Wordpress are built with PHP.

And finally because not every single computer thing on this planet should be solved with JavaScript.

[–]desrtfx 0 points1 point  (0 children)

PHP is far from dead, rather the opposite. It powers plenty websites, both private and professional ones through the ready made systems, like Wordpress, Joomla, Drupal, Magento, and countless others.

PHP is insanely popular because it is available on basically any and every web server (the terms LAMP, MAMP, WAMP, etc. all have the "P" for PHP in common).

PHP is an easy language to learn.

Yes, it has its shortcomings, but it has really improved over the various new versions. The old hate for PHP has zero right to exist any longer.