firstname . ' ' . $this->lastname; } } class User extends UserFunctions { protected $firstname; # Cannot be private! protected $lastname; # Private scope only inside $this class function __construct() { $this->firstname = "Vasilij"; $this->lastname = "Pupkin"; } } $u = new User(); echo $u->getName(); # Result is 'Vasilij Pupkin' witout scope errors