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]
|