5 ms·
PHP isn't being replaced by Rust or Go. It's being replaced by Medium, Wix, and Squarespace. At this point, the predominant reason it's still undergoing active
by echelon 7y ago
PHP isn't being replaced by Rust or Go. It's being replaced by Medium, Wix, and Squarespace.
At this point, the predominant reason it's still undergoing active development is that there is a metric ton of legacy PHP code. As the businesses still using it either mature, evolve, or fail, the need for PHP will begin to dry up.
You're defending the language from an emotional standpoint.
> choosing php for a new project is a no-brianer. The only other 2 stacks to which I can compare it are the Spring stack of Java or .NET core
This is absolutely not the case, and you know it. Almost every language has a wealth of HTTP tools and frameworks, and many of them come built-in.
Choosing PHP will be like choosing Python 2. In fact, that's my 2030 prediction.
- tcd 7y ago> As the businesses still using it either mature, evolve, or fail, the need for PHP will begin to dry up. People have been calling for PHP's death, or saying PHP is a dying language, for as long as the internet has been around. It's always the same arguments, that $newHipLanguage will replace it. Then you actually do some research and understand just how much of the internet is still powered by PHP and will continue to do so for the forseeable future. So, I'm still waiting for PHP's death. Or for this same predictable comment in 2030.
- echelon 7y ago> It's always the same arguments, that $newHipLanguage will replace it. It's not that a new language will replace it. It's that the people that hire PHP to solve their problem will now use a platform with no code to manage. Engineers writing platforms will choose languages other than PHP to write them. You can't spin up multiple request threads to make concurrent non-blocking queries in PHP.
- ainiriand 7y ago- You can't spin up multiple request threads to make concurrent non-blocking queries in PHP You mean that you don't know how to: https://github.com/amphp/amp https://github.com/amphp/amp
- echelon 7y agoIt's not built into the language? How can we be sure this project with 2k Github stars won't segfault, memleak, deadlock, or have some other horrible bug [1]? I haven't done full due diligence, but I'm already suspicious. The open tickets don't look good [2]. > You mean that you don't know how to I'm not convinced you found an appropriate answer either. In any case, this should be a language feature. [1] It looks like it relies on bindings to an unofficial native code extension. [2] https://github.com/amphp/amp/issues/300 https://github.com/amphp/amp/issues/300
- ainiriand 7y agoDon't look at js then.
- bufferoverflow 7y ago> You can't spin up multiple request threads to make concurrent non-blocking queries in PHP. I think you can. https://dev.to/webong/using-asynchronous-processes-in-php-7io https://dev.to/webong/using-asynchronous-processes-in-php-7i...
- AegirLeet 7y ago> This is absolutely not the case, and you know it. Almost every language has a wealth of HTTP tools and frameworks, and many of them come built-in. Lots of languages have HTTP tools and frameworks, but not many of them are even comparable in scope to Symfony or Laravel. Out of curiosity, can anyone point me at some frameworks in other languages that have the following things built-in? * Route matching and dispatch * URL generation (generate a URL for some route) including signed and temporary URLs * Middlewares * Abstractions for dealing with incoming HTTP requests (getting headers, body, uploaded files etc.) * Abstractions for creating and sending HTTP responses (headers, body etc.) * CSRF protection * Database drivers for a couple of backends (MySQL, PostgreSQL, SQLite etc.) * Database migrations * Database seeding * Views/HTML rendering * Logging capabilities (configurable backends like rotating log files, syslog, Slack etc.) * Sessions with different storage backends (filesystem, Redis etc.) * Request validation ("this field is required, has to be a string, between x and y characters long" etc.) * Translation and localization * Broadcasting through WebSockets * Caching with a couple of backends (filesystem, database, Redis etc.) * Email sending with a couple of backends (SMTP, Mailgun, SES etc.) * Notifications with different channels (Email, SMS etc.) and backends (SMTP, Mailgun, Twilio etc.) * Job queues with different backends (database, Redis, SQS etc.) * Scheduled jobs * Authentication (different flavors like regular sessions, API tokens etc.) * Authorization * Hashing * Encryption * Query builder * ORM with relations between objects, JSON serialization etc. * CLI commands with option/argument parsing, colored output, progress bars etc. * Events, including async handling of events * File storage with a couple of backends (local filesystem, S3 etc.) * Pagination * Payment integration * Full text search with different backends (database, Algolia etc.) This is basically the feature set of Laravel, I probably missed some things too. And I don't mean "oh yeah I'm sure there's a library for that" - I mean fully integrated, first-party, tested, dead simple to use and available by default. Maybe I'm wrong, but I seriously doubt this just exists in any language.
- jsjohnst 7y ago> PHP isn't being replaced by Rust or Go. It's being replaced by Medium, Wix, and Squarespace. Funny that you mention Squarespace as replacing PHP when they themselves are a big PHP shop.
- muglug 7y agoThe definitely are not a big PHP shop - they're a big Java shop, with maybe one small PHP acquisition. This is evidenced in their open-source GitHub projects: https://github.com/squarespace https://github.com/squarespace