A Class with a Method : Class Method Class PHP

 
<?php
class Item {
  var $name = "item";

  function getName() {
    return "item";
  }
 }

 $item = new Item ();
 print $item->getName ();
?>