A Class with a Method
<?php class Item { var $name = "item"; function getName() { return "item"; } } $item = new Item (); print $item->getName (); ?>