<?php //the non-OOP way echo "Name: Andrew"; ?>
<?php //the OOP way class Person { var $name; function name() { return $this->name; } } $person = new Person; $person->name = "Andrew"; echo "Name: ".$person->name().""; ?>