Live data from Hacker News

25 Years of PHP

jetbrains.com

71–80 of 426 posts

Re: 25 Years of PHP

#71
post #61

If you were starting a project now, would you choose PHP or Hack?

Hack is interesting and the native C++ interface is a breeze. But choose PHP if you want to live. Hack has only a fraction of the PHP ecosystem and if you mix with PHP, then you lose the advantages very quickly.

Re: 25 Years of PHP

#72
Long time ago I was learning Perl, because at that time basically the whole Internet ran on Perl CGI scripts. I thought, "man, Perl is weird".

Then I learnt PHP, because whole internet seemed to move to Apache+PHP. I thought, "man, that's Perl done right!".

Then I actually learnt Perl, looked at my PHP code written earlier. I thought "WTF?"

Now I use Python. I think "man, why I have to type this silly whitespace?"

Re: 25 Years of PHP

#73
post #32

I wrote a lot of PHP from 1999-2008. First as a hobby, then professionally. From 20 LOC guestbooks to payment gateways used to process millions in payments. It wasn't until recently that I was sure I'd written more code in any other language than PHP. These days I'll occasionally poke around with it or patch a bug, but that's about it. Is it a perfect language? No. But which language is? (I can hear the Lisp crowd gr…

Every time there's a story about PHP there's a comment like yours, and then in reply there's a comment like mine:

Yes it's perfectly fine to use PHP if it's a productive environment for you. Of course it's possible to write good software with it. Of course a skilled developer will manage to do great things with sub-standard tools. Many extremely popular websites were and even still are powered by PHP, that's undeniable.

But that doesn't mean that we should absolve PHP of all its many, many design errors over the years. There were for a long time many fundamental issues with PHP as a language that didn't exist with its peers. The language was not so much designed as it was cobbled together by amateurs starting from a half-backed templating engine.

I'm not saying that to hate on PHP, I just believe that it's important to learn from your mistakes if you don't want to end up reproducing them. It's important to acknowledge the many failings of PHP even if many of them are now ancient history.

This revisionist stance that there was never anything really wrong with PHP and it's just Lispers who hated on the language because it was popular and beginner-friendly and they didn't know what they were talking about is simply, factually, provably untrue.

Re: 25 Years of PHP

#74
post #6

PHP is damn fast now, no joke. And with all of the modern features it's actually not so bad to work in. I'm becoming increasingly puzzled every time I see PHP hate now, especially when I read tired comments like "just use rails". Laravel is arguably as good or even better than rails at this point, and PHP 7+ is definitely light years faster and lighter. One thing that still sucks is package management / composer.

> One thing that still sucks is package management / composer

What about Composer? Sure is in par with Slack when it comes to memory usage, bit it's functional and feature rich. v2 has partial offline support, faster downloads, etc. (https://php.watch/articles/composer-2).

Composer IMHO is one of the best dependency managers for any language out there.

Disclaimer: the link above is a for a site I maintain.

Re: 25 Years of PHP

#75
One thing I really enjoy in JS world is an ability to write both back and front in same language. SPAs now being the norm also puts more weight towards front. PHP had a knack for 'just works' in most cases and will always be dear to my heart.

Re: 25 Years of PHP

#76

Recently I have been thinking about moving my personal blog from Wordpress to a static site generator, because I don't allow comments or use Wordpress plugins. (Those who want comments can still use a combination of a static site generator and Disqus.) It occurred to me that once I did that, I could completely disable PHP on my Apache installation. It made me wonder how much usage of PHP out there is essentially a hi…

But Movable Type was written (mostly) in Perl... I'm not sure I see how Movable Type affects PHP all that much, but maybe I'm missing something.

Re: 25 Years of PHP

#77
post #37

Earlier quoted context omitted.

Afaik after the whole PHPixie scandal, they got backlash but the PSR standards they adopted are still in use. PHPixie thread: https://groups.google.com/forum/#!topic/php-fig/cjLBp2weYaA

Oh my. I lol’ed at the comment: > A big +1 to what Robert said. Let's not be the PHP Drama Group or the PHP Court of Social Justice. It seems like all these “groups that have arbitrary mechanisms for becoming a member and have some sway in the wider community” eventually end up becoming a giant ball of drama and controversy.

But doesn't that criteria also describe every open source mailing list ever?

Re: 25 Years of PHP

#78
post #6

PHP is damn fast now, no joke. And with all of the modern features it's actually not so bad to work in. I'm becoming increasingly puzzled every time I see PHP hate now, especially when I read tired comments like "just use rails". Laravel is arguably as good or even better than rails at this point, and PHP 7+ is definitely light years faster and lighter. One thing that still sucks is package management / composer.

The speed is the main reason I decided to experiment with building a Node.js module last week that allows you to use PHP as a templating engine for Express apps: https://www.npmjs.com/package/php I had guessed that PHP might be faster than mainstream JS-based templating systems like EJS and in my tests so far in an app I'm building it appears my guess was right. Even with the overhead of serializing and deserializing…

Did they seriously take the "php" namespace in the registry?!?! That shouldn't be allowed.

Re: 25 Years of PHP

#79

[flagged]

> interns > more than 10 years ago How that looks to me: Wow, that application has provided so much business value (over a decade worth) despite being designed by less experienced software engineers. PHP must be a great language.

this. PHP just gets shit done. newbies might add few sql injections here and there, so you gotta hand them some code convention/code review/frameworks, but PHP just gets stuff done fast and with extremely low overhead

Re: 25 Years of PHP

#80
post #39
post #17

Earlier quoted context omitted.

Ah yes, the classic "my application is shit so the language must be shit" straw man argument. Sorry to hear you have to work on shitty code. But neither the choice of language nor the lack of framework are to blame. Blame the developers and/or the organizational culture that caused it to be in such a poor state.

> But neither the choice of language nor the lack of framework are to blame. This is partly true. It is possible to make something great with substandard tools. I suspect a master craftsman with a set of dull saws and blunt chisels using his shoe for a hammer will still have the skill to create something pretty good. But it will be frustrating, and most people aren't master craftsmen so what they will produce will be…

> It is possible to make something great with substandard tools.

Is PHP substandard though? While it's no longer my cup of tea, I do remember it being fairly stable and performant.

Some of the enterprise software I work with, that was written in Java is ridiculously bad, but I don't consider Java substandard. Real world example: the "Configuration" app I use takes a minute to start up on modern hardware, and it's main job is to give a tabular GUI to an XML file. Even saving the configuration can take a minute.

Post reply on HN