<?php class Dog { var $name; function bark() { print "Woof!"; } } $pooch = new Dog; $pooch -> name = "new name"; print $pooch -> name . " says "; $pooch -> bark(); ?>