Question: Which code snippet uses the correct syntax for creating an instance of the Pet class?

  1. `$dog = new Pet;`
  2. all of these answers
  3. `$horse = (new Pet);`
  4. `$cat = new Pet();`

Answer: The correct answer of the above question is Option B:all of these answers