note 94976 added to language.oop5.paamayim-nekudotayim

From: Date: Sun, 06 Dec 2009 04:58:15 +0000
Subject: note 94976 added to language.oop5.paamayim-nekudotayim
Groups: php.notes 
Request: Send a blank email to php-notes+get-163611@lists.php.net to get a copy of this message
A class constant, class property (static), and class function (static) can all share the same name and be accessed using the double-colon. <?php class A { public static $B = '1'; # Static class variable. const B = '2'; # Class constant. public static function B() { # Static class function. return '3'; } } echo A::$B . A::B . A::B(); # Outputs: 123 ?> ---- Server IP: 192.41.40.227 Probable Submitter: 76.25.107.41 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php Edit -- https://master.php.net/note/edit/94976 Del: integrated -- https://master.php.net/note/delete/94976/integrated Del: useless -- https://master.php.net/note/delete/94976/useless Del: bad code -- https://master.php.net/note/delete/94976/bad+code Del: spam -- https://master.php.net/note/delete/94976/spam Del: non-english -- https://master.php.net/note/delete/94976/non-english Del: in docs -- https://master.php.net/note/delete/94976/in+docs Del: other reasons-- https://master.php.net/note/delete/94976 Reject -- https://master.php.net/note/reject/94976 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#163611) next »