Live data from Hacker News

Taking PHP Seriously (2016)

slack.engineering

101–110 of 150 posts

Re: Taking PHP Seriously (2016)

#101
post #80
post #10

This seems to be an unpopular opinion in the tech world, but I honestly enjoy working with PHP. It's such a simple, robust language, and you can use it in many different ways, depending on what you're building (OOP, scripting, microservices, etc).

I think the design of PHP the environment is brilliant: no state, requesting a url just executes a file. So simple and solid. That being said, at some point in 2010-2015 timeline it became essential to master Javascript to do anything good on the web, and so it became a diversion of precious resources to continue to invest in PHP as well. Instead the progression has just been to recreate the PHP high level architectu…

Is NodeJS on the server side faster or lower memory? Because the tooling feels heavier with node modules breaking out thousands of files.

I imagine async of Node may help somewhat.

Re: Taking PHP Seriously (2016)

#102
post #84

It's like an ugly C. It's a perfectly reasonable choice for web development, just like a Chevy Caprice is a perfectly reasonable car for a taxi service (as evidenced by the thousands of them in NYC, still plodding along). You'd still rather ride in a Mercedes E430 taxi (long time European standard)... unless you had never experienced both, in which case you probably think the Caprice is just fine. And if you knew Rub…

Eh, both take you from point A to point B if that's what you are looking for.

Re: Taking PHP Seriously (2016)

#103

Somewhat unrelated comment, but the fact that PHP got so good and most people are still not willing to give it a second chance goes to show how hard it is for a language to regain market share after people left for greener pastures.

I would guess because the greener pastures are still greener or otherwise maybe just as green? I moved from PHP to Ruby and Rails eight years ago. I _really_ enjoy writing Ruby (I love the syntax) and Rails servers all my web dev needs perfectly. I'm now learning about the joys of functional languages though Elixir/Erlang (a common next step for Rubyists).

The question is: so what if PHP even has caught up? What could I possibly gain from going back to it? I would have to rebuild context and learn a whole new web framework in a language whose syntax I personally do not enjoy. So no matter how good it's become, it's totally not worth my time and energy to switch back to it.

Re: Taking PHP Seriously (2016)

#104
post #79

Earlier quoted context omitted.

"Use an IDE" is never an answer to shitty language design. Shitty language design is shitty language design. That said, I cut my teeth on PHP and still have a fondness for it. It's especially great being able to deploy small little backend-driven pages with rsync or sftp in a pinch. I just discovered other languages and environments I enjoyed working in much better.

If there's room for Javascript, there's room for PHP. Both are sloppy, inferior languages, but both can do anything you need. And unfortunately, both have immense momentum from being first in the web game.

It's worth pointing out back end JavaScript didn't really start to take off until the 0.x versions of NodeJS came out

Re: Taking PHP Seriously (2016)

#105

Somewhat unrelated comment, but the fact that PHP got so good and most people are still not willing to give it a second chance goes to show how hard it is for a language to regain market share after people left for greener pastures.

> Somewhat unrelated comment, but the fact that PHP got so good and most people are still not willing to give it a second chance goes to show how hard it is for a language to regain market share after people left for greener pastures. I guess some of the reasons why some devs would not chose PHP (horrid syntax, std lib mess, stupid error reporting system, language inconsistencies, the very existance of php.ini, overr…

Some of the most annoying things in the language (error reporting and type coercing in comparison operators) are fixed in PHP 8.

Re: Taking PHP Seriously (2016)

#107
Anyone here want to share their opinion's on Magento? The small time I spent with it left me with a feeling it was the most over engineering piece of software I've ever worked with. It's made to build a market for modules to buy and isn't made to run an e-commerce site.

All written in PHP.

Re: Taking PHP Seriously (2016)

#108
"First, state. Every web request starts from a completely blank slate. Its namespace and globals are uninitialized, except for the standard globals, functions and classes that provide primitive functionality and life support."

It was somewhat amusing to see some of the same people that made fun of this later espouse the virtues of AWS Lambda.

Re: Taking PHP Seriously (2016)

#109

Anyone here want to share their opinion's on Magento? The small time I spent with it left me with a feeling it was the most over engineering piece of software I've ever worked with. It's made to build a market for modules to buy and isn't made to run an e-commerce site. All written in PHP.

Yes, Magento is a really poorly written piece of software.

I'm not sure what relevance that has to this article. I could name a lot more software written in PHP that is poor. Does that tell us anything about PHP itself? I don't think so.

Re: Taking PHP Seriously (2016)

#110
post #77

Earlier quoted context omitted.

Really depends on what the business is doing. Chewing through TBs of data every hour? Probably not a good idea to use Ruby. Doing a bunch of really heavy math? Probably not a good idea to choose PHP. Doing a SaaS service? C++ probably isn't a good choice. There are some really good general purpose languages that can fit most circumstances (Java, .Net languages, Go). However, I'd be careful to say that you could apply…

I hate to be "that guy" but I see no reason not to use PHP for all three of those things. PHP is faster than Ruby. [1] PHP from a local script does math just fine. It's the round trip of the request to a PHP server and back that you're associating with poor language performance. In a local scripting environment PHP7 is considerably faster than Python3. [2] PHP is an extremely popular language as the backend for SaaS,…

"PHP from a local script does math just fine"

I suspect they meant the kind of heavy math that the PHP 8.x JIT is trying to improve performance for.

Post reply on HN