Create a new class and create an instance then use its property and method
<?php class Dog { var $name; function bark() { print "Woof!"; } } $pooch = new Dog; $pooch -> name = "new name"; print $pooch -> name . " says "; $pooch -> bark(); ?>