News for hackers. Stuff that matters.
Re:Modern PHP by supz_k on Sunday March 27, 2022 @01:17PM (#30821967)
We handle 50-60 million monthly page views (comments embed requests) in our commenting system using PHP/Laravel, NGINX (2 load balanced servers), Redis (for queues and caching), and MYSQL.

All performance issues we have ever encountered were always related to the database - never had an issue with PHP or Laravel.

However, we use Node.js for websockets. Though there are some improvements in PHP for event-driven development (like ReactPHP [1]), it was quite hard to find proper documentation and help to build a production-ready WebSocket server. So, we ended up using Node.js for that.

The new features added to PHP in the latest versions are great. Type hinting and return types are really helpful in writing better code. I hope there will be an addition to type hint advanced data structures (ex: Arrays of Objects) in a future version.

[1] https://reactphp.org/

Re:Modern PHP by nine_k on Sunday March 27, 2022 @08:28PM (#30825619)
If you want better types, have you taken a look at Hack?

https://hacklang.org