note 15012 deleted from keyword.paamayim-nekudotayim by felipe

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
Note Submitter: tim dot ward at stivesdirect dot com 

----

If you call a function in this way then you need to be aware that internal class references will not work (presumably as there isn't an instance for $this to refer to)

e.g.
>Class fred
>{     function fred()
>      {     $this->fred2();
>      }
>      function fred2()
>      {     echo("hello world");
>      }
>}
>fred::fred();

... will cause a
"Fatal error: Call to a member function on a non-object in ..."

This took me ages to work out
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.