OOP: how to build an object

1 · Arnaud Langlade · March 10, 2021, midnight
OOP: how to build an object @danist07 In this new blog post, I want to talk about object building more specifically about primary and secondary constructors. The primary constructor is the default way to build an object with all its dependencies. The secondary constructors provide other ways to build objects depending on use cases. Note: I did not work on a PHP8 project yet so that is why I won’t talk about named arguments feature. Primary constructor The PHP language provides a single way to b...