One thing that’s funny about #ai and #programming is I keep hearing the same thing. “Oh I use it for generic snippets, just common tasks and functions”.
The amusing thing about that is when I first started working with a #php app years ago there was already a solution to that problem. It was called “the PHP Cookbook” published by O’Reilly. I was told “oh we buy you a PDF copy and you just search for whatever you are trying to do and use that code. It saves a ton of time for junior programmers.”
Not only was it true, it did save me a ton of time and headaches, but we didn’t need to steal anything. The authors got paid, it worked offline, it didn’t require scraping the entirety of human knowledge to write or nuclear power plants worth of energy to distribute.
It also helped me learn. Since I would have a solid foundation to the solution, I felt more confident experimenting. I always had a known-functioning standard library solution as my base. So when something broke I knew where to start debugging.
Just an incredible thought that instead of paying $20 for a pdf once we decided this was the way to go.
#PHP 8.4 is introducing newing up a class and accessing methods, properties, etc. on it without wrapping it in parentheses first. Another useful feature I will probably use on a daily basis. In my daily work with #Laravel I often need to crawl some content from a website or an API. This feature will make my code a little less cluttered.
Please, web app developers, consider how your users will upgrade. If your upgrade process is "remove the old one, unzip the new one", then it's not an upgrade process. It's an encouragement to never upgrade.
#PHP 8.4 introducing "Property Hooks". This means you will be able to hook into the default read and write behavior of your class properties. The design also allows for more hooks in the future. Really looking forward to this one!
We have released a new library: TypoRules for #PHP 🎉
It is not actually new, as we have been working with it for years to enable outstanding #typography in our #web and #print applications. What is new is that all functionalities are now available in a bundled form and as #opensource.
Got to say: Just been through upgrading an app from #PHP 8.1 to 8.3 and it's really nice and painfree.
Very few breaking changes, and the few that are there are stuff that a sensible person would've addressed a long time ago.
Unfortuantely that means that apart from readonly classes, there are also few exciting new things in there. But I guess these also are just point updates after all…
Almost boring 😉 (Not a bad thing! Stability is also nice.)