note 103326 deleted from function.empty by danbrown

From: Date: Thu, 07 Apr 2011 14:28:33 +0000
Subject: note 103326 deleted from function.empty by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-178593@lists.php.net to get a copy of this message
Note Submitter: basil at yourdev dot ch ---- checking empty class constant will not work: if(empty(YourClass::TheConstante)) { echo "sorry the constante is empty!"; } it will turn into this error: parse error: syntax error, unexpected ')', expecting '(' in .. use this instead: if(YourClass::TheConstante == "") { echo "sorry the constante is empty!"; }

« previous php.notes (#178593) next »