Live data from Hacker News

25 Years of PHP

jetbrains.com

151–160 of 426 posts

Re: 25 Years of PHP

#151
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…

> PHP's low entry barrier is a blessing That's the error.

What's up with that elitist attitude? Are you saying that people shouldn't be able to write code unless they've first how to do it properly?

Re: 25 Years of PHP

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

What do you dislike about composer?

Re: 25 Years of PHP

#153
post #82
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…

> The only ceremony you need to write executable code is the This is a really underappreciated aspect to development in general and web development in particular. There are (or at least were) an awful lot of "shared hosting" providers which are cheap, convenient, and run PHP and CGI only .

ColdFusion, Java Server Pages, and other languages copied this syntax. I don’t see it anymore except with php. Does anyone know of any other languages still in use that have this?

Re: 25 Years of PHP

#154
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

You left out a "g" for the first link.

Re: 25 Years of PHP

#156
post #55

Earlier quoted context omitted.

What are the "modern" features of php? It looks like it's trying to shed it's dynamic nature and add types (with annotations etc). Also frameworks like Symfony / Laravel look more and more like java web frameworks to me. I'm not saying this is necessarily bad but there's nothing modern about types. Also, might make more sense to choose java if you need types.

Symfony is directly inspired by Spring, and Laravel is an based on Symfony, so yes, that's the direction they are going. I kinda hate that trend, but it satisfies a cross section of devs who want "serious" enterprise looking code base but don't want to move from PHP. It's still noticeably different from Java, even with the heavy typing and all the inspiration.

Laravel uses some Symfony components, but it isn't based on Symfony. Laravel was heavily inspired by Rails.

Re: 25 Years of PHP

#157
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…

While I agree that PHP does have pros as well as cons, I find it disconcerting that I've read MANY assertions here on HN, that PHP detractors just haven't used it very much or are mostly complaining about things like bad standard library function names. I've used PHP in earnest. It and JavaScript are tied for worst programming languages I've used. JavaScript gets more of a "pass" from me because I'm just not a dynami…

I dont agree with you at all.

Why are you building arrays with mixed key types?

Why do you want type hints?

Why do you need generics in a dynamically typed language?

Php has pthreads. They just arent needed that often.

Async is being worked on You didnt mention it but immutable types are also being worked on.

Everything people complain about php over tends to actually make its way into the language eventually.

I dont know when you tried php, but I dont really think it was in earnest. It sounds like you had problems keeping your types straight.

I agree its not super natural to deal with the php type system but once you learn it its pretty simple to keep things in order.

I see most messes arise when people mix types, mutate variables carelessly, or otherwise over leverage things they shouldnt (e.g. globals)

But these are hygiene problems, and all languages have these.

Ive seen garbage java, ive seen hairballed rust, ive seen pretty much any c, ive seen wanky golang and ive seen babel-typescri-rea-tsx

The only thing that really annoys me about php these days is the dollar signs.

That and the frameworks are all trash.

Re: 25 Years of PHP

#158
post #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 undeniab…

From a language design perspective, you're absolutely right. I started with PHP 3, shortly before PHP 4 was released. 4 and 5 were major improvements over 3. And sure, a lot of cruft remain(s|ed). And there are definitely things that could be better. But overall, it's a pleasant language to work in.

Re: 25 Years of PHP

#159
post #82

Earlier quoted context omitted.

> The only ceremony you need to write executable code is the This is a really underappreciated aspect to development in general and web development in particular. There are (or at least were) an awful lot of "shared hosting" providers which are cheap, convenient, and run PHP and CGI only .

ColdFusion, Java Server Pages, and other languages copied this syntax. I don’t see it anymore except with php. Does anyone know of any other languages still in use that have this?

You can do it in a lot of templating engines like Jinja2 and ERB.

Re: 25 Years of PHP

#160

Earlier quoted context omitted.

That's not being fair. There are many comments on HN of people saying exactly that PHP just isn't bad. The grandparent reply even says: >My only real gripe with PHP is the annotation syntax.

The parent comment claimed that PHP's former sins were being absolved. The quote you are referencing is about the current state of PHP.

The parent comment to mine, though, said:

> No one is claiming that PHP is and/or was without fault.

I'm emphasizing the "is" part. "No one is claiming that PHP is without fault."

My comment is asserting that there are definitely people who say that PHP is not bad. I did not speak to whether anyone claims PHP was never bad.

Post reply on HN