You are here: Re: static call of non-static method? « PHP Programming Language « IT news, forums, messages
Re: static call of non-static method?

Posted by gosha bine on 09/21/07 13:04

On 21.09.2007 14:49 Mads Lee Jensen wrote:
> Hi i was wondering why i can call a class method, by double colon.
> without declaring it static.
>
> this is my test
>
> class Test_1
> {
> public function hello()
> {
> echo 'Hello';
> }
> }
> Test_1::hello();
>

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация