...

/

Challenge: Access Modifiers

Challenge: Access Modifiers

Add a property to a class and write appropriate getter and setter functions.

We'll cover the following...

Task

Let’s consider a User class that contains a private property with the name of $firstName.

  • Create a setter
...