Live data from Hacker News

25 Years of PHP

jetbrains.com

371–380 of 426 posts

Re: 25 Years of PHP

#371

I've written many languages (starting with ML –Machine Language). I'm currently developing in Swift, and loving it. I wrote PHP for about 20 of its 25 years. I never really got to love the language, but got fairly good with it. I don't miss it much. I have used it to write some industrial-scale systems, though. It's a perfectly good language, and is still under active development and improvement; with a vast user bas…

I tried to like Swift but with Perl as my first language Swift's regex implementation made me want to throw up. That and having to escape opening brackets and double parameter definitions. I just don't get the love for Swift other than it being an improvement over Objective C.

Re: 25 Years of PHP

#372
post #29

I started with PHP 15 years ago, but after 5 years I just moved to Java. The worst thing with PHP was people and standards, everything was a mess, there was no right way to do stuff and larger projects had like 100 different implementations for the same thing. PHP was really challenging to work with as coming to a shared agreement for how one should implement stuff was a recipe for personal conflicts. So after a few…

Symfony really paved the way for quality PHP code. Excellent Web framework which is a lot of fun.

I could never buy a screen wide enough to display a full path with Symfony. Not quite as bad as its predecessor - Zend Framework - but finding the end of a file path was like jumping down a rabbit hole.

Re: 25 Years of PHP

#373

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?"

Did you try HTML::Mason or were you stuck with CGI::Application or even plain old cgi? Mason is like PHP but its dependenc on mod_perl made unfortunately made it a non-starter for cheap hosts. Catalyst was an abomination but I think Mojolicious deserves more adoption that it gets.

Re: 25 Years of PHP

#374

After several years now of defaulting to Go, in the last month I've gone back to PHP (specifically Laravel) for a new project. It's... comfortable. That's probably the best way I can describe how I feel about it. I've missed working in PHP, despite how much I enjoy Go.

Same. I love Go, the language, much more than PHP, but Laravel.. Laravel is really great. I wish Go had something as convenient and complete as Laravel. Unfortunately that's impossible to achieve in a static language without polymorphism (generics) or metaprogramming. I'm waiting for Go to introduce polymorphism and I'll be watching closely to see how 'post-generics' web frameworks make Go great again!

Have you tried the Buffalo framework? It's touted as Go's answer to Rails.

Re: 25 Years of PHP

#375
post #225

Earlier quoted context omitted.

Here's some that are utterly trivial to find. There are plenty more. Feel free, as a supposedly competent PHP programmer, to go and find the rest, becayse you definitely need to know about them to be able to write code that's going to work properly. Moved the examples to a gist due to HN formatting: https://gist.github.com/wjessop/0923e0667d7dd53ae0503459894e...

This gotchas are similar to JS or Python ones. I hit more issues related to php configuration or server configuration then language issues, maybe because I use a good IDE that will prevent such trivial bugs.

There are edge cases in many languages, there are more in PHP. It would be better to not have the edge cases than to have an IDE that tried to pretect you from them.

Re: 25 Years of PHP

#376
post #371

I've written many languages (starting with ML –Machine Language). I'm currently developing in Swift, and loving it. I wrote PHP for about 20 of its 25 years. I never really got to love the language, but got fairly good with it. I don't miss it much. I have used it to write some industrial-scale systems, though. It's a perfectly good language, and is still under active development and improvement; with a vast user bas…

I tried to like Swift but with Perl as my first language Swift's regex implementation made me want to throw up. That and having to escape opening brackets and double parameter definitions. I just don't get the love for Swift other than it being an improvement over Objective C.

I consider Perl to be a “write-only” language. Damn good text processor, though. I wrote an entire CMS in Perl, back in the late 90s.

I still wake up, screaming...

Swift isn’t any worse than most modern languages, when it comes to text processing, but that’s not what I use it for.

In fact, it has some very powerful string handling, built-in, but it’s kind of weird, if you are used to more traditional languages.

Re: 25 Years of PHP

#378
post #25

Earlier quoted context omitted.

I'm not sure why this comment identically copies the GP with the exception of the last line, but it doesn't appear to be a spam account.

I switch PHP to C to show OP in a mirror how ridiculous his statement is.

Woops. Thanks :)

Re: 25 Years of PHP

#379
post #371

Earlier quoted context omitted.

I tried to like Swift but with Perl as my first language Swift's regex implementation made me want to throw up. That and having to escape opening brackets and double parameter definitions. I just don't get the love for Swift other than it being an improvement over Objective C.

I consider Perl to be a “write-only” language. Damn good text processor, though. I wrote an entire CMS in Perl, back in the late 90s. I still wake up, screaming... Swift isn’t any worse than most modern languages, when it comes to text processing, but that’s not what I use it for. In fact, it has some very powerful string handling, built-in, but it’s kind of weird, if you are used to more traditional languages.

I never got the "write-only" criticism. If you understand a language thoroughly code is always readable. What's with the insane double param naming? And why do I have to escape and opening paren? No other language requires this.

Re: 25 Years of PHP

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

A lot of PHP work is digging around in Wordpress themes & plugins with a bunch of other (third-party) themes and plugins installed, some of them paid which can add another layer of annoyance to testing and deployment and such. Hosting's usually some managed thing rather than anything under your direct control, and usually quirky or limited in some way or another. It's a pretty miserable ecosystem to work in. PHP itse…

Interestingly enough, there was a commit to WordPress core to bump the recommended PHP version to 7.2

If users are running below that, they'll got a notice telling them to contact their hosting provider and get them to upgrade.

https://twitter.com/schlessera/status/1270788445808537604?s=...

Combined with the JS work going on in WP, it's going to be an interesting 5 years I think. I would not be surprised if a lot of WordPress core starts to get rewritten. I know many of the large plugin authors are already pushing full steam ahead with modern PHP features and dropping support for old versions. Now that core can "take the blame" it's a lot easier to justify and I don't blame them.

Post reply on HN