Re: Static weirdness..

From: Date: Wed, 18 Feb 2004 10:54:21 +0000
Subject: Re: Static weirdness..
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-7949@lists.php.net to get a copy of this message
On Wed, 18 Feb 2004 02:53:50 -0500 john@coggeshall.org (John Coggeshall) wrote: > http://bugs.php.net/bug.php?id=27304 > > Marcus says he's brought this up before, and i think it really needs > to be addressed before PHP 5 so I'm bringing it up again. I am told > that currently we are allowing static methods to be called from an > object context because of a performance hit if we check every call, > but currently because $this is undefined regardless of context there > is no way even for the developer to check if the method was called > properly. imho, this is the expected behavior. At least a notice should be raised. I do not see a reason to define $this if a method is explicitly defined as static (means it should not be called dynamically). Declare the same funciton as public|private|protected and everything works fine. pierre

« previous php.internals (#7949) next »