Challenge: Magic Method
Use the constructor magic method to set the class properties.
We'll cover the following...
Task
Let’s consider the User
class given below with the private properties of $firstName
and $lastName
.
- Add an ability to the constructor to