note 74163 added to language.oop5.constants

From: Date: Wed, 28 Mar 2007 05:59:35 +0000
Subject: note 74163 added to language.oop5.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-124873@lists.php.net to get a copy of this message
gt at realvertex.com You miss the point. Allowing dynamically assigned class constants will prevent the cluttering of global constants and allow you to even protect the accessibility of said constants to prevent conflicts. For example, the constants for class MySQL won't be directly available to the class Display. So I don't have to worry about prefixing all of my constants (which shouldn't be necessary and is just plain ugly). Either way, class constants simply do not follow the global constant operation. You are allowed to set a global constant at any time during the script, yet class constants are only allowed to be set in the class header and are processed prior to script execution. michikono at symbol gmail dot com: This is an interesting solution and I think I will implement it as a temporary "solution" to the constant issue. Thank you for taking the time to post! ---- Server IP: 194.153.94.10 Probable Submitter: 24.19.238.20 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.constants.php Edit -- https://master.php.net/note/edit/74163 Del: integrated -- https://master.php.net/note/delete/74163/integrated Del: useless -- https://master.php.net/note/delete/74163/useless Del: bad code -- https://master.php.net/note/delete/74163/bad+code Del: spam -- https://master.php.net/note/delete/74163/spam Del: non-english -- https://master.php.net/note/delete/74163/non-english Del: in docs -- https://master.php.net/note/delete/74163/in+docs Del: other reasons-- https://master.php.net/note/delete/74163 Reject -- https://master.php.net/note/reject/74163 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124873) next »