note 74331 deleted from language.constants by philip

From: Date: Fri, 06 Apr 2007 08:00:04 +0000
Subject: note 74331 deleted from language.constants by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125134@lists.php.net to get a copy of this message
Note Submitter: colin Reason: bad code ---- The belt-and-suspenders approach to defining constants: <?php function getFoo() { if (!defined('FOO')) define('FOO', 'value'); return FOO; } define('FOO', getFoo()); echo FOO; ?>

« previous php.notes (#125134) next »