session_start();

class ExampleClass
{
    use Singleton;
    const Singleton = true;   // This turns on data serialization (storage) for all other variables in the class
    // even if implicit, or not directly defined
    public $foo;

    public function __construct($stuff=''){
        if (empty($stuff) && isset($this->foo)) {
            return;
        }
        $this->foo = $stuff;
    }

    public function $bar(){
       print $foo;
    }
}