Challenge: Type Hinting
Explore how to apply type hinting and polymorphism in PHP by creating a User interface and a Commentator class. Learn to enforce type safety for user properties and implement functions that add appropriate salutations to usernames.
We'll cover the following...
We'll cover the following...
Task
-
Create a
Userinterface with setter and getter methods for the$usernameand$genderproperties. -
Now, create a ...