Live data from Hacker News

PHP 8.1.0

php.net

151–160 of 286 posts

Re: PHP 8.1.0

#151

I've been using PHP since 5.x. Often had to work on older 4.x web apps. I find it interesting when I read people saying "PHP has come a long way. It's a proper language now, etc." If you work long enough with a language and figure out most its quirks, it's a breeze. It's nice that they are adding all these new features, but they are hardly what makes it or break it for me. Here is the one features that is taken for g…

I just run go test. No need for alt+tab. Why reloading anything when testing the backend code?

Perhaps it's not a SPA but has traditional backend-side templates for pages.

Re: PHP 8.1.0

#152
post #18

Everyone laughing at PHP hasn't tried it for years, I'd bet. It started clumsy, true, but it became a solid and quite elegant way of doing things. And by things I don't mean just web development. The current limitations I see in PHP is that there is not an official multi-core coroutines solution.

I used Symfony and it was fine but there are some challenges:

1. The combination associative array/array data type is weird and I feel like the performance is not predictable unless you devote time to learning specifically about it

2. You're still stuck with all the weird legacy stuff, even if you don't use it, because someone else might bring it in

3. The OO stuff is basically like an old version of Java and a bit tedious to write. An IDE is definitely required

4. Many PHP developers formed their ideas about coding in the bad old days and will resist efforts to make code more testable or whatever because it's "too complicated."

Re: PHP 8.1.0

#153
post #108

Earlier quoted context omitted.

There isn't a language that can replace php in 2021. Javascript doesn't have the size of build-in library. Golang is compiled and limited, blank spaces/tabs will kill a Python program. Ruby /rails is slower. All are harder to host. What could you replace php with? The tales of legacy mistakes holding back php are things with no basis in reality. What legacy mistake holds php back? Method names/parameter ordering? Whe…

Honest question: what are people using if not PHP? Node? Python? The 80% of us who aren’t FAANG and are writing CRUD apps. I’ve tried researching the pros/cons and all I get are low quality listicles. Nobody can tell me why PHP is “bad” or what Python does that PHP can’t. Inconsistent params are the only argument I’ve heard. Which my IDE solves. What about JavaScript splice vs slice. I look it up every time.

Out of date but this is the classic anti-PHP polemic. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Re: PHP 8.1.0

#154
post #19

Who is still using PHP anno 2021?

Considering just WordPress powers something like 40% of the whole www, I'd say quite a few people!

I'd say there's a difference between choosing an established product like WordPress or MediaWiki and looking at a greenfield project and choosing PHP.

Re: PHP 8.1.0

#155
post #36

Earlier quoted context omitted.

https://slack.engineering/taking-php-seriously/

This post is 5 years old. Slack migrated from PHP to Hack. By now you can not run PHP code in Hack anymore.

They've got an article about that too for those interested. https://slack.engineering/hacklang-at-slack-a-better-php/

Re: PHP 8.1.0

#156
post #108

Earlier quoted context omitted.

There isn't a language that can replace php in 2021. Javascript doesn't have the size of build-in library. Golang is compiled and limited, blank spaces/tabs will kill a Python program. Ruby /rails is slower. All are harder to host. What could you replace php with? The tales of legacy mistakes holding back php are things with no basis in reality. What legacy mistake holds php back? Method names/parameter ordering? Whe…

Honest question: what are people using if not PHP? Node? Python? The 80% of us who aren’t FAANG and are writing CRUD apps. I’ve tried researching the pros/cons and all I get are low quality listicles. Nobody can tell me why PHP is “bad” or what Python does that PHP can’t. Inconsistent params are the only argument I’ve heard. Which my IDE solves. What about JavaScript splice vs slice. I look it up every time.

Statistically PHP software has the most vulnerabilities. They are also quite different when compared to other languages. Language has many features which might be used unintentionally by programmer, leading for serious bugs. Not a good language to start with.

Re: PHP 8.1.0

#157

Still holding the web. Happy to see it is continually evolving.

What's your estimate for PHP's long-term viability? I'm asking, because it was the hobbyists and kids who got started in PHP mucking around in their everyday white-label cPanel/Plesk-based web-hosting accounts in the very early 2000s that really gave PHP the mindshare of enthusiastic users and thus its staying power. But it's 2021 now: all the kids are getting started with NodeJS for server-side web-applications, not…

My impression is that the market for PHP development is almost a separate ecosystem from other languages.

Re: PHP 8.1.0

#158
post #77

Genuinely curious: who here thinks PHP is a good choice for a new project and also has experience with other languages such as Scala, Kotlin, Python, or JavaScript and their respective web frameworks?

I started out with PHP, if I'm building an actual app though, Ruby on Rails is still my go to.

Re: PHP 8.1.0

#159
post #156

Earlier quoted context omitted.

Honest question: what are people using if not PHP? Node? Python? The 80% of us who aren’t FAANG and are writing CRUD apps. I’ve tried researching the pros/cons and all I get are low quality listicles. Nobody can tell me why PHP is “bad” or what Python does that PHP can’t. Inconsistent params are the only argument I’ve heard. Which my IDE solves. What about JavaScript splice vs slice. I look it up every time.

Statistically PHP software has the most vulnerabilities. They are also quite different when compared to other languages. Language has many features which might be used unintentionally by programmer, leading for serious bugs. Not a good language to start with.

What features are used unintentionally leading to serious bugs?

Re: PHP 8.1.0

#160

Earlier quoted context omitted.

Honest question: what are people using if not PHP? Node? Python? The 80% of us who aren’t FAANG and are writing CRUD apps. I’ve tried researching the pros/cons and all I get are low quality listicles. Nobody can tell me why PHP is “bad” or what Python does that PHP can’t. Inconsistent params are the only argument I’ve heard. Which my IDE solves. What about JavaScript splice vs slice. I look it up every time.

Out of date but this is the classic anti-PHP polemic. https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

It was out of date when it was written.
Post reply on HN