PHP 8.4 Property Hooks
– ashallendesign.co.uk - submitted by Ash Allen
Read about the upcoming "property hooks" feature that will be added in PHP 8.4.
Read more [ashallendesign.co.uk]
Posts tagged with oop
– ashallendesign.co.uk - submitted by Ash Allen
Read about the upcoming "property hooks" feature that will be added in PHP 8.4.
Read more [ashallendesign.co.uk]
– davorminchorov.com - submitted by Davor Minchorov
Learn about the differences between thinking in terms of data (CRUD) vs thinking in terms of business processes (behaviour) and how it affects code maintainability.
Read more [davorminchorov.com]
Join 9,500+ smart developers
Every month I share what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
– acairns.co.uk - submitted by Andrew Cairns
Learn about Composition, Inheritance and what Composition over Inheritance means with a little help from some 8-bit friends!
Read more [acairns.co.uk]
– www.otsch.codes - submitted by Christian Olear
Abstract classes cannot be instantiated directly, posing a challenge when testing functionality implemented within the abstract class itself. In this article, I share my approach to addressing this issue.
Read more [www.otsch.codes]
Matthias Noback explains the difference.
Read more [matthiasnoback.nl]
As a system evolves, abstractions should arise from current needs, not future possibilities.
Read more [sebastiandedeyne.com]
– aschmelyun.com - submitted by Andrew Schmelyun
If you've been working with PHP regularly, chances are you've run across an Interface, Trait, or Abstract Class. At first glance, they might appear to have a few similarities between them, and it can be hard to make out their differences and use cases.
Read more [aschmelyun.com]
PHP is a wonderful dynamic language that's capable of many cool things. I recently stumbled upon something quite fantastic that I want to share with you.
Andraes Möller blogged a few interesting strategies to name the constructors of your PHP objects.
Read more [localheinz.com]
Kevlin Henney makes the case for not suffixing class names, or files with the type of object it contains.
Read more [kevlinhenney.medium.com]
– doeken.org - submitted by Doeke Norg
The Visitor Pattern opens up your entities to extension without changing them (much); and keeps the code separate.
Read more [doeken.org]
– doeken.org - submitted by Doeke Norg
The Adapter pattern and the Bridge Pattern have brought along a lot of confusion. Time to connect the dots.
Read more [doeken.org]
– doeken.org - submitted by Doeke Norg
Enhance (final) classes and functions by implementing these similar, but not quite the same, patterns.
Read more [doeken.org]
– doeken.org - submitted by Doeke Norg
Cloning is a nice way of creating a quick copy of an object. But there are some things you need to be aware of!
Read more [doeken.org]
– ryangjchandler.co.uk - submitted by Ryan Chandler
Let's take a look at how we can create a custom Option type to handle optional values in PHP.
Read more [ryangjchandler.co.uk]
– doeken.org - submitted by Doeke Norg
Context from traits is copy-pasted to your class and NOT inherited. What does that imply?
Read more [doeken.org]
– www.juststeveking.uk - submitted by Steve McDougall
Laravel transporter is an easy to use wrapper around Laravel PendingRequest that allows you to define requests as classes, and override options at run time when you need to.
Read more [www.juststeveking.uk]
Sometimes it is not clear what the responsibility of a certain class is. This can be solved by adding a suffix to the class name.
– www.tonysm.com - submitted by Tony Messias
Tony Messias explains this design pattern using a cool example.
Read more [www.tonysm.com]
– lorisleiva.com - submitted by Loris
Learn why, when and how to structure your data as a cluster of nodes and how to execute various operations on that cluster via external visitors.
Read more [lorisleiva.com]