class Person { public $name = ''; } $person = new Person(); $person->name = 'bob'; echo $person->name;