note 45834 deleted from language.oop5.constants by nlopess

From: Date: Mon, 11 Oct 2004 16:41:18 +0000
Subject: note 45834 deleted from language.oop5.constants by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-78355@lists.php.net to get a copy of this message
Note Submitter: Alexandre Gravem ---- I don't know how pratical is it, but you can make a class to use like a namespace to constants: <?php static class Booleans { const On = true; const Off = false; const Yes = true; const No = false; } if ($answer == Booleans::Yes) { //do something } ?>

« previous php.notes (#78355) next »