note 103326 added to function.empty

From: Date: Thu, 07 Apr 2011 09:12:47 +0000
Subject: note 103326 added to function.empty
Groups: php.notes 
Request: Send a blank email to php-notes+get-178589@lists.php.net to get a copy of this message
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!"; } ---- Server IP: 62.2.182.223 Probable Submitter: 212.94.56.130 ---- Manual Page -- http://www.php.net/manual/en/function.empty.php Edit -- https://master.php.net/note/edit/103326 Del: integrated -- https://master.php.net/note/delete/103326/integrated Del: useless -- https://master.php.net/note/delete/103326/useless Del: bad code -- https://master.php.net/note/delete/103326/bad+code Del: spam -- https://master.php.net/note/delete/103326/spam Del: non-english -- https://master.php.net/note/delete/103326/non-english Del: in docs -- https://master.php.net/note/delete/103326/in+docs Del: other reasons-- https://master.php.net/note/delete/103326 Reject -- https://master.php.net/note/reject/103326 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#178589) next »