note 100906 added to language.oop5.constants

From: Date: Sun, 14 Nov 2010 14:58:37 +0000
Subject: note 100906 added to language.oop5.constants
Groups: php.notes 
Request: Send a blank email to php-notes+get-174021@lists.php.net to get a copy of this message
A few comments about the comment below: 1. I don't know that it's fair to say that "most people" miss the point of constants. 2. Another important purpose for constants, IMHO, is to make code more readable but avoiding "magic" numbers (values that someone trying to understand the code is likely to wonder about). 3. In fairness to "John Galt", the comment does NOT say that his example declares an array, it says it's a work-around for making a constant that contains array data. ---- Server IP: 64.71.164.2 Probable Submitter: 24.61.217.157 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.constants.php Edit -- https://master.php.net/note/edit/100906 Del: integrated -- https://master.php.net/note/delete/100906/integrated Del: useless -- https://master.php.net/note/delete/100906/useless Del: bad code -- https://master.php.net/note/delete/100906/bad+code Del: spam -- https://master.php.net/note/delete/100906/spam Del: non-english -- https://master.php.net/note/delete/100906/non-english Del: in docs -- https://master.php.net/note/delete/100906/in+docs Del: other reasons-- https://master.php.net/note/delete/100906 Reject -- https://master.php.net/note/reject/100906 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#174021) next »