note 80220 added to language.oop5.static

From: Date: Fri, 04 Jan 2008 15:34:26 +0000
Subject: note 80220 added to language.oop5.static
Groups: php.notes 
Request: Send a blank email to php-notes+get-134775@lists.php.net to get a copy of this message
Hi've trying around to get a static var using a variable class name and does not work...this does not work! <?php class Foo { public static function aStaticMethod() { // ... } } Foo::aStaticMethod(); $classname = 'Foo'; $classname::aStaticMethod(); ?> ---- Server IP: 80.64.47.13 Probable Submitter: 213.229.137.231 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.static.php Edit -- https://master.php.net/note/edit/80220 Del: integrated -- https://master.php.net/note/delete/80220/integrated Del: useless -- https://master.php.net/note/delete/80220/useless Del: bad code -- https://master.php.net/note/delete/80220/bad+code Del: spam -- https://master.php.net/note/delete/80220/spam Del: non-english -- https://master.php.net/note/delete/80220/non-english Del: in docs -- https://master.php.net/note/delete/80220/in+docs Del: other reasons-- https://master.php.net/note/delete/80220 Reject -- https://master.php.net/note/reject/80220 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#134775) next »