Live data from Hacker News

The Future of PHP

medium.com

61–66 of 66 posts

Re: The Future of PHP

#61

I'm hearing a lot of praise for PHP frameworks such as Laravel, but I'm not sure PHP should strive to become more like RoR and Node.js. Rather, PHP's unique selling point, for me anyway, is its use as embedded language in otherwise static HTML pages via SGMLish processing instructions (` `), and I think there's nothing wrong with that even with the current preference towards Ajax and (micro)services. It's just that e…

Mixing PHP, SQL and HTML is ok for 200 lines apps. It does not scale to even 10 000+ lines of code and no one is doing that anymore.

Some people are still using PHP just as a template language, but there are still issues with XSS, that one could avoid by default with dedicated template languages like Twig.

Current main selling point of PHP are great frameworks and ecosystems, easy to find developers, and share nothing architecture that removes whole class of problems related to memory leaks and scalability.

Re: The Future of PHP

#62
post #27

As far as prominent products, besides WordPress, Facebook, and Wikipedia, Slack and Mailchimp are (were?) also PHP. (I googled and apparently a prominent '-hub' site uses it too.) The PHP hate never made sense to me in the context of the rise of Node.js: * In PHP I've never accidentally combined 2 + 0.3 into 20.3 * I dislike the cowboy-ish over-use of ternary operators and short-circuiting by JS devs (random example…

"but now when Rails-based companies have to scale they end up using Java or JVM-based infrastructure." Ya, Shopify begs to differ with you on that one. It's trendy to migrate a dynamic language to typed one because that's the first thing some CTO's who came from typed background want to do...it's hardly about scaling imo. Isn't Shopify proof Rails can scale?

Re: The Future of PHP

#63

It’s not dead but there’s no point in learning it if you don’t know it already. Pretty much every language used for web development is better than PHP. Python is more consistent and has better support for async code. JavaScript can be used on backend, web and mobile, Java and C# are faster and have better typing

Javascript better than PHP - I doubt. There are several solution for having Node.js style PHP too and they are doing great, see reactphp and alike

Re: The Future of PHP

#64
post #27

As far as prominent products, besides WordPress, Facebook, and Wikipedia, Slack and Mailchimp are (were?) also PHP. (I googled and apparently a prominent '-hub' site uses it too.) The PHP hate never made sense to me in the context of the rise of Node.js: * In PHP I've never accidentally combined 2 + 0.3 into 20.3 * I dislike the cowboy-ish over-use of ternary operators and short-circuiting by JS devs (random example…

pornhub is 100% PHP. some URLs don't even hide the fact that they are .php scripts.

Re: The Future of PHP

#65

I've been really impressed by the performance improvements made during the last couple of years. I guess my main issues with the language is the non-uniform naming of functions and the ordering of their parameters. At some point, I'd like to see a new major release that deprecates all of those old problems in order to clean stuff up. Even if it means breaking backwards compatibility a year or two later on. It turns o…

Differences in naming & parameter order for the PHP standard library functions are because they are usually just a thin layer above a C library, therefore are consistent for that C library (e.g. string functions), but not between libraries. Would it really make sense for PHP to standardize between C libraries?
Post reply on HN