PHP objects & properties
Every class in PHP must have new instances or object created. This object must be assigned to a variable. An object will always be assigned when creating a new object unless the object has a constructor defined that throws an exception on error
Example:<?php
$instance = new sample();
?>
For accessing an objects property and In order to perform a method within an object; one needs to specify both the object name and the function name:
$result = $instance->setsample('value');