It doesn't maintain state between requests, and that is a perfect match for HTTP.
It's easy and fast to deploy. You don't need to restart things or think about reusing ports to update without downtime.
It's easy to sandbox, making hosting very cheap compared to most other languages.
It's basically "serverless" with really good startup times.
It has better performance than most other interpreted languages.
It has support for many functions that many other languages would require a dependency for.
Development speed quite fast as a result of the large amount of included things.
You can to some degree decide if you want to use strict types, or just ignore it.
It has a large ecosystem with multiple great, feature rich, and battle tested frameworks.
It's has very good backwards compatibility, and it's easy to upgrade large code bases to newer version.
It's documentation is the gold standard according to many.
While it's definetly not one of the coolest or most fun languages, it's definitely one of the greatest for the web. Doesn't PHP run something like 75-80 % of all websites today? Clearly it's doing something much better than others.
It doesn't maintain state between requests, and that is a perfect match for HTTP.
It's easy and fast to deploy. You don't need to restart things or think about reusing ports to update without downtime.
It's easy to sandbox, making hosting very cheap compared to most other languages.
It's basically "serverless" with really good startup times.
It has better performance than most other interpreted languages.
It has support for many functions that many other languages would require a dependency for.
Development speed quite fast as a result of the large amount of included things.
You can to some degree decide if you want to use strict types, or just ignore it.
It has a large ecosystem with multiple great, feature rich, and battle tested frameworks.
It's has very good backwards compatibility, and it's easy to upgrade large code bases to newer version.
It's documentation is the gold standard according to many.
While it's definetly not one of the coolest or most fun languages, it's definitely one of the greatest for the web. Doesn't PHP run something like 75-80 % of all websites today? Clearly it's doing something much better than others.