Live data from Hacker News

PHP 8.4

php.net

331–337 of 337 posts

Re: PHP 8.4

#331
post #310

Earlier quoted context omitted.

Does anyone really FTP files like its 2003? Even in PHP you deploy with some sort of tool, like docker etc. The reload page thing is pretty much solved in all languages with a watcher. entr is a universal one, thats written in C and fast as anything. The thing (most) other languages have is unicode support and concurrency. In PHP there is basically none of these. Fast? You mean fast as in CPU bound tasks? 99.99% of P…

Link those benchmarks please. Both 500 and 10k-30k seem extremely low.

That was a ballpark estimation, and while pure req/sec is usually irrelevant, it still comes in when the load starts to increase and you need to squeeze every last drop of perf.

PHP usually is doing poorly, even with its "cache", and when you realize that PHP devs actually are not PHP devs, but framework (like laravel/symfony) devs you need to account for the overhead of the framework too.

But you can have a look at the framework benchmarks game:

https://www.techempower.com/benchmarks/#section=data-r21&hw=...

Re: PHP 8.4

#332

I'm just a PHP programmer for work, but I worry about the orientation PHP has chosen. As French people say: better is the enemy of good (Le mieux est l'ennemi du bien). The two new language features bring a higher language complexity for dubious gains. I hope I won't have to work with these. Property hooks mean that some language magic will turn a property access into a call to methods. It implies that `$this->x` has…

This feature has been in C# since about 2.0, and it's been an overall positive. It reduces boilerplate and inconsistencies in different programmers doing the boiler-plate differently. It also gives static analysis tools semantic information about the structure of your classes. It can group pairs of methods that deal with the encapsulation of fields.

My favorite feature about properties is that I can set a breakpoint on the setter. It'll now break on anything that sets it with a single breakpoint. Or use "Go to calls" on the setter and I instantly get everything that sets the variable. Of course also works with the getter. Being able to do this, yet only use it as a field is so nice. Other than this, I find properties indispensable in MVVM scenarios so that the view reacts when you set a property. Using getter and setter methods would litter my code so bad that I can't see a "clarity of intent" net positive.

Re: PHP 8.4

#333
post #310

Earlier quoted context omitted.

Link those benchmarks please. Both 500 and 10k-30k seem extremely low.

That was a ballpark estimation, and while pure req/sec is usually irrelevant, it still comes in when the load starts to increase and you need to squeeze every last drop of perf. PHP usually is doing poorly, even with its "cache", and when you realize that PHP devs actually are not PHP devs, but framework (like laravel/symfony) devs you need to account for the overhead of the framework too. But you can have a look at…

I think they'd prefer not to be confused with the benchmarks game ;-)

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re: PHP 8.4

#334
post #72

Earlier quoted context omitted.

> faster then Java You sure about that? Not what I would have expected. Source?

My point was less about the leaderboards and more about it being pointless comparison. But I was looking at https://web-frameworks-benchmark.netlify.app/result?l=java,p... though I don't really know what people consider "best benchmark" for raw vs raw. Once you start throwing in apache/nginx/proxies/what ever it really starts to balance itself.

> equally if not faster then python

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

> faster then Java

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

> faster then ruby

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re: PHP 8.4

#335
post #262
post #247

Earlier quoted context omitted.

If needed you can get LTS from Zend. They still offer security fixes for 7.2 until end of 2026 and 8.3 is supported until end of 2029. But that's just if upgrading every second or third year is too expensive to you.

Zend offerings are confusing. https://www.zend.com/services/php-long-term-support only lists 8.0 and earlier, https://www.zend.com/products/zendphp-enterprise does have a chart showing 8.3 into 2029 but once again the text only mentions 8.0. What gives?

Anything after 8.0 is not EOL. Security support for 8.1 is still provided by PHP itself until end 2025.

Re: PHP 8.4

#336
post #71

Great PHP release. Better stack traces for closures, performance improvements (always nice), HTML5 support, lazy objects and much more. Great work and a big thanks to everyone involved!

IMHO the HTML5 parser is the best improvement of this version.

Re: PHP 8.4

#337

I find it pretty fascinating that what used to be a beginner-friendly language, with limited capabilities but that is very easy to get started with, has now evolve to a bloated monster full of advanced features that you can't expect to know entirely, with a complex framework and tooling ecosystem to support it. PHP lovers generally don't like acknowledge that, but the PHP we've learned back-end development two decade…

I picked up php a couple of months back after 30 years of ignoring it, mostly after reading a comment somewhere about using php for shell scripting. Very easy to read the language documentation on php.net and get moving. Powerful standard library. I haven't found another language (not an exhaustive claim) that offers language documentation as helpful as php's for a beginner.

Yes, the presentation of the documentation is very good. This is something I miss when I have to switch to other languages.

I also use it to write CLI scripts to exchange data between programs. The wealth of extensions and good UTF-8 support are a plus.

Post reply on HN