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

  • $dog = new Pet;
  • all of these answers
  • $horse = (new Pet);
  • $cat = new Pet();
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend