Live data from Hacker News

25 Years of PHP

jetbrains.com

301–310 of 426 posts

Re: 25 Years of PHP

#302
post #52

Earlier quoted context omitted.

some of the function names make me want to stab people What would be an example? My only real gripe with PHP is the annotation syntax What do you mean? Afaik there is no "annotation syntax" in PHP. Could it be that you confuse what certain frameworks and IDEs do with PHP, the language?

> What would be an example? The mix of c like strpos, strstr and inconsistent parameter ordering (see array map and filter for example) > What do you mean? Afaik there is no "annotation syntax" in PHP. Could it be that you confuse what certain frameworks and IDEs do with PHP, the language If there's no official standard, but everyone follows a community standard, then that is the standard. Quit being pedantic. Hopefu…

>Hopefully PHP 8's attributes work to fix the mess that is phpdoc being used for annotations.

PHP8 annotations won't allow nested annotations so its only a partial solution.

Re: 25 Years of PHP

#303
post #282
post #134

Earlier quoted context omitted.

This is honestly the first I’ve ever heard anyone complain about composer. Having experienced a number of other package managers, composer is by far my favorite. Like have you spent any time with npm? Composer is light years ahead in reliability and expectations matching reality.

The amount of fighting I've had to do with setting up NPM for legacy applications, or with any sort of virtualization is insane. I no longer set up Node/NPM on anything automated without NVM, since they seem to drop support for old packages at random. You have to jump through a ton of hoops to make NVM play well when it's effectively installed by root but ran by another user within the container. Running NPM in a uni…

Funny! I'm dealing with a very similar problem right now. We're trying to port our CI workflow from DroneCI to GitHub Actions and our private NPM packages have been a literal nightmare. In comparison, our private composer packages worked fine with very little fuss.

Re: 25 Years of PHP

#305
post #115

Rasmus Lerdorf look at the last 25 years of PHP: https://www.youtube.com/watch?v=wCZ5TJCBWM Really interesting for anyone wondering what the thinking was behind function naming and other inconsistencies jump to: https://youtu.be/wCZ5TJCBWMg?t=987 and https://youtu.be/wCZ5TJCBWMg?t=1466

If I look from outside - it looks like there was exactly 0 thinking involved in function naming.

That is the look on the inside as well.

Re: 25 Years of PHP

#306
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.

You don't know how good you have it with composer until you try other package managers.

Re: 25 Years of PHP

#307
And WordPress, which is hated even by PHP devs, continues to grow now powering 37.3% of all websites [1]. Until last year, it maintained compatibility with PHP 5.2 essentially relying on PHP of the 2007 (now bumped to 5.6 which was released in 2014).

[1] https://w3techs.com/technologies/overview/content_management

Re: 25 Years of PHP

#308

"Smarty released. The best-known templating engine for PHP. Rasmus realized that he had done something wrong when people started writing template engines for his template engine in his template engine" :D

I strongly agree Smarty is beyond terrible (and I've used it and read the source code, so I know its problems first hand) and the fact that it even exists is indicitive of deep flaws in PHP, but I don't believe Rasmus has ever realized that he did anything wrong. He just doesn't care.

"We have things like protected properties. We have abstract methods. We have all this stuff that your computer science teacher told you you should be using. I DON'T CARE about this crap at all." -Rasmus Lerdorf

"I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say Yeah it works but you're leaking memory everywhere. Perhaps we should fix that. I'll just restart Apache every 10 requests." -Rasmus Lerdorf

https://news.ycombinator.com/item?id=20736574

DonHopkins 9 months ago | parent | favorite | on: YAML: Probably not so great after all

One of the most ridiculous examples of this was the Smarty templating language for PHP. Somebody got the silly idea in their head of implementing a templating language in PHP, even though PHP is ALREADY a templating language. So they took out all the useful features of PHP, then stuck a few of them back in with even goofier inconsistent hard-to-learn syntax, in a way that required a code generation step, and made templates absolutely impossible to debug.

So in the end your template programmers need to know something just as difficult as PHP itself, yet even more esoteric and less well documented, and it doesn't even end up saving PHP programmers any time, either.

https://web.archive.org/web/20100226023855/http://lutt.se/bl...

>Bad things you accomplish when using Smarty:

>Adding a second language to program in, and increasing the complexity. And the language is not well spread at all, allthough it is’nt hard to learn.

>Not really making the code more readable for the designer.

>You include a lot of code which, in my eyes, is just overkill (more code to parse means slower sites).

https://web.archive.org/web/20090227001433/http://www.rantin...

>Most people would argue, that Smarty is a good solution for templating. I really can’t see any valid reasons, that that is so. Specially since “Templating” and “Language” should never be in the same statement. Let alone one word after another. People are telling me, that Smarty is “better for designers, since they don’t need to learn PHP!”. Wait. What? You’re not learning one programming language, but you’re learning some other? What’s the point in that, anyway? Do us all a favour, and just think the next time you issue that statement, okay?

http://www.ianbicking.org/php-ghetto.html

>I think the Broken Windows theory applies here. PHP is such a load of crap, right down to the standard library, that it creates a culture where it's acceptable to write horrible code. The bugs and security holes are so common, it doesn't seem so important to keep everything in order and audited. Fixes get applied wholesale, with monstrosities like magic quotes. It's like a shoot-first-ask-questions-later policing policy -- sure some apps get messed up, but maybe you catch a few attacks in the process. It's what happened when the language designers gave up. Maybe with PHP 5 they are trying to clean up the neighborhood, but that doesn't change the fact when you program in PHP you are programming in a dump.

Re: 25 Years of PHP

#310

I've been using PHP for most of my web development career (a decade). What are the industry standards for backend web development languages in 2020? I was under the impression PHP was the way to go for back end web development.

I would say golang has been a strong contender for that role for a while now besides the usual java/ruby/python stacks. You can use many languages for your backend, but golang is IMHO the best out there right now (but as always: it really depends on your use-case)

Hidden advertising for Go. Nothing better than good old C++.
Post reply on HN