Class Type Hints
Class type hints ensure that a function receives an object of a specific class.
Example
Section titled “Example”class User {public string $name;}
function greet(User $user) {echo "Hello " . $user->name;}
$user = new User();$user->name = "John";
greet($user);