note 64572 added to function.constant

From: Date: Tue, 18 Apr 2006 21:58:53 +0000
Subject: note 64572 added to function.constant
Groups: php.notes 
Request: Send a blank email to php-notes+get-108451@lists.php.net to get a copy of this message
Technically you can define constants with names that are not valid for variables: <?php // $3some is not a valid variable name // This will not work $3some = 'invalid'; // This works define('3some', 'valid'); echo constant('3some'); ?> Of course this is not a good practice, but PHP has got you covered. ---- Server IP: 216.235.15.211 Probable Submitter: 67.71.49.113 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.constant.php Edit -- http://master.php.net/note/edit/64572 Del: integrated -- http://master.php.net/note/delete/64572/integrated Del: useless -- http://master.php.net/note/delete/64572/useless Del: bad code -- http://master.php.net/note/delete/64572/bad+code Del: spam -- http://master.php.net/note/delete/64572/spam Del: non-english -- http://master.php.net/note/delete/64572/non-english Del: in docs -- http://master.php.net/note/delete/64572/in+docs Del: other reasons-- http://master.php.net/note/delete/64572 Reject -- http://master.php.net/note/reject/64572 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#108451) next »