# Question on PHP 6 and static calls to instance methods.

- Thread: https://externals.io/message/37427
- Original archive: https://news-web.php.net/php.internals/37427
- Started by Adam Richardson on 2008-05-04T03:55:16+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #37427 — Adam Richardson — 2008-05-04T03:55:16+00:00

URL: https://externals.io/message/37427#37427

I've incorporated use of the ability to call instance methods through  
static calls, allowing for me to mimic multiple inheritance without  
having to make edits to classes that are already working because of  
the behavior of '$this' when instance methods are called statically.

As stated on in the basics section on classes and objects:

"$this is a reference to the calling object (usually the object to  
which the method belongs, but can be another object, if the method is  
called statically from the context of a secondary object)."

I've made great use of that functionality in my framework.  However,  
It sounds like this is going to cause a fatal error in PHP6.  Is this  
in fact true?  And, if the behavior is going to change, can somebody  
explain what the impetus for this change was?

Thank you very much for your time,

Adam

Adam Richardson
Envision Internet Consulting, LLC
Phone: (517)623-0485

Services and insight for building effective, user-oriented websites.
