note 88185 rejected from language.oop5.static by danbrown

From: Date: Wed, 14 Jan 2009 17:56:53 +0000
Subject: note 88185 rejected from language.oop5.static by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-149188@lists.php.net to get a copy of this message
Note Submitter: eandre at omeco dot de ---- class Foo { public static function get() { echo "foo"; } } print Foo::get(); // outputs foo - this is the it should work $foo = new Foo; print $foo->get(); // outputs foo also - this should not be able to work. is it a bug? why is it possible to call a method signed as static. static methods are used with classes, am i right? may it be, that i could call static methods with an object, where the class signature isnt abstract?

« previous php.notes (#149188) next »