static call of non-static method? [again] sorry.
am 21.09.2007 17:20:32 von Mads Lee Jensen
Sorry for posting this message again. Im new with the google groups
and something seems wrong
maybe it is because i changed my email after posting to a valid email
i noticed the other didnt exists eny more
and i couldnt see the replys ..
My question is
how come it possible to access a class method with double colon,
without declaring the method static?
my test
class Test_1
{
public function hello()
{
echo 'Hello';
}
}
Test_1::hello();
Re: static call of non-static method? [again] sorry.
am 21.09.2007 17:34:50 von gosha bine
On 21.09.2007 17:20 Mads Lee Jensen wrote:
> Sorry for posting this message again. Im new with the google groups
> and something seems wrong
> maybe it is because i changed my email after posting to a valid email
> i noticed the other didnt exists eny more
> and i couldnt see the replys ..
>
> My question is
> how come it possible to access a class method with double colon,
> without declaring the method static?
>
> my test
>
> class Test_1
> {
> public function hello()
> {
> echo 'Hello';
> }
> }
> Test_1::hello();
>
copypasting my prev. reply
This behaviour is for compatibility with php4. It raises a E_STRICT
error in php5 and will be fatal error in php6.
--
gosha bine
makrell ~ http://www.tagarga.com/blok/makrell
php done right ;) http://code.google.com/p/pihipi