Define the class
class MyClass
{
  public $PropertyA, $PropertyB, $PropertyC;

  function MyFunctionName()
  {
    return "Value is $this->PropertyA.";
  }

}
Use the class
  $MyObject = new MyClass();

  $MyObject->PropertyA = "abc";

  echo $MyObject->MyFunctionName();

Constructor

The constructor function is optional, if defined it is automatically called when an object is instantiated.

class MyClass
{
  public $PropertyA, $PropertyB, $PropertyC;

  //*********************************
  //********** CONSTRUCTOR **********
  //*********************************
  function __construct()    //<<<You can optionally add arguments to be passed to this function when the class is created using new, e.g. function __construct($PropertyA, $PropertyB)
  {
    
    $this->PropertyA = "abc";

  }

}