PHP - Inheritance and Polymorphism
Which of the following is the correct syntax to type hint a function parameter with a parent class Animal in PHP?
function feed(____ $pet) { /* ... */ }Which of the following is the correct syntax to type hint a function parameter with a parent class Animal in PHP?
function feed(____ $pet) { /* ... */ }Type $variable.Animal $pet.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions