<?php class Item { var $name = "item"; function setName( $n ) { $this->name = $n; } function getName() { return $this->name; } } $item = new Item(); $item->setName("widget 5442"); print $item->getName (); ?>