+7  A: 

You cant use $this in a static function. Use self:: instead

webdestroya
undefined class constant first_name; error
thnks very much ...i really appreciate for you help
No problem, glad I could help :)
webdestroya
+3  A: 

Make full_name non-static:

public function full_name() {}

You cannot access instance variables from a static method but that is exactly what you are trying to do.

If you use self instead of $this, you have to declare $first_name and $last_name static as well.

I don't even understand why you declare this method as static in the first place. It is an instance method by all means.

Felix Kling
i really appreciate thnx very much
A: 

Check the last name of your index.php. echo->$object->full_name() is not valid. Use echo $object->full_name() instead.

Also, declare full_name() as non-static.

danilo
thnks very much