Live data from Hacker News

PHP 8.1.0

php.net

201–210 of 286 posts

Re: PHP 8.1.0

#201

Earlier quoted context omitted.

I think you (and to be fair, many people) are missing a huge part of why PHP is still popular. Saying Ruby can replace PHP sounds to me like saying that Ruby can replace Excel. It's fundamentally misunderstanding _why_ it's popular in the first place. I have a HTML page. How do I add a hit counter to it with Ruby? I can do it right now in PHP with zero dependencies and it'll fit in this comment: You are visitor numbe…

This example seems to be a great demo of why people do not like working with PHP. PHP makes the shit method the massively simpler way and the good method much harder. Now you open yourself up to risks like what happens if we accidentally let some user input change the file opened as well as the content written. While with rails, to do basically anything, you already have a full db ready and incrementing a counter usi…

[deleted]

Re: PHP 8.1.0

#202

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 worked with PHP solely for years and always thought the language was good for me but that it made it easy for codebases to go to shit. I’ve worked with half a dozen other languages now and have realized all codebases just suck for the individual because like all things people are heavily opinionated about how the code should be organized. As for react, I work with a medium sized code base in the hundreds of thousan…

I wonder how much of the shitty code bases have more to do with the popularity of PHP (for web based applications) than anything else. I've seen plenty of shitty code bases fin just about any language. If there's more of something, there will be more of it that's of low quality.

Not denying your point though. There is some real awful stuff out there that could make a grown man cry.

Re: PHP 8.1.0

#203
post #50

Say what you want about PHP, but here we are decades later. I'm still using it, it still works, and it's still getting updated and improved.

What is this argument for, or against?

Re: PHP 8.1.0

#204

Earlier quoted context omitted.

There's also Moodle which got extremely more important because of the pandemic. Nothing that ever becomes as popular as PHP and continues evolving for 2+ decades disappears quickly. I think 10+15 years... I don't know... I think it will last longer. COBOL and FORTRAN are still alive, there was more heavy money into both but there are more minds in PHP.

Ah, yes - Moodle. My 6th Form experimented with Moodle when I was a student there - that was a loooooong time ago (2004? 2006?). I remember the staff weren't happy that Moodle allowed students to set their own avatars because too many kids figured out you could use animated GIFs as avatars, probably copied from eBaums or deviantArt; while others uploaded shock-images or just controversial content because I guess that…

We used moodle in uni cca 10 years ago and it worked fine. Did online quizzes/exams, homework submission, forums, lecture notes, ...

Re: PHP 8.1.0

#205

Earlier quoted context omitted.

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

Can we _please_ stop posting that link, in 2021? It's very, very outdated.

I warned it was outdated and it has a date. Nevertheless, it's a classic piece and a number of the criticisms are still true. I don't see what makes it any worse than linking to the Unix Hater's Handbook, which is also outdated in many respects and yet still considered a classic for a reason.

Re: PHP 8.1.0

#206
post #159
post #156

Earlier quoted context omitted.

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?

The ease of the "just put it on the filesystem and it can be run!" system also opens up security vulnerabilities when people want to enable file uploads, for instance. I think the proliferation of places you can put configuration for the runtime is also a potential source of issues, as are various forms of string escaping that should be avoided.

Re: PHP 8.1.0

#207
post #118
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?

Kotlin is for Android apps. Scala is a Java replacement. Those frameworks are unrelated. Are you talking about building an Android app? I've built app in different Javascript frameworks. Angular, Vue, React. If I was building a website I would use PHP over Python, Golang or Javascript frameworks because what you get out of the box doesn't compare. Each language does something well. If I was building AI python would b…

> Kotlin is for Android apps.

I have used Kotlin for web services and, while I prefer Scala or plain Java for that, some of my colleagues prefer the Kotlin syntax and features.

> what you get out of the box doesn't compare.

Would you like to elaborate here? I have used Rails and Django and they get you a lot out of the box.

Re: PHP 8.1.0

#208

Earlier quoted context omitted.

Honestly, I don't see much difference. You learn either way. People may have preferences, that's fine. A compiler isn't a magical tool that creates bug free code.

The difference is massive. Computers are many orders of magnitude better at this kind of thing than humans, especially in a large application where changing the shape of a single data structure can have cascading effects throughout the entire code base; you simply will not catch things a typechecker will.

An IDE does provide some help. Certainly, I'm not arguing against compilers. I was merely commenting on the "iterating on ideas is much quicker".

Re: PHP 8.1.0

#209

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…

[deleted]

Re: PHP 8.1.0

#210

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…

Good point. One can read it as "making 50 mistakes per minute", I read it as "wait only 1.2 seconds to see the effect".
Post reply on HN