By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,887 Members | 1,003 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,887 IT Pros & Developers. It's quick & easy.

static call of non-static method? [again] sorry.

P: n/a
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();

Sep 21 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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
Sep 21 '07 #2

P: n/a
I see :) that makes sense thanks for replying :) (twice)
Sep 21 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.