note 34481 deleted from function.empty by didou

From: Date: Tue, 29 Jul 2003 07:36:26 +0000
Subject: note 34481 deleted from function.empty by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52886@lists.php.net to get a copy of this message
Note Submitter: n031 ---- empty() used to function correctly upon CONSTANTS. As of 4.3?, it gives me errors if I try to use a constant. DEFINE("MYCONSTANTHASAVALUE", "it's O.S.C.A.R"); if ( empty(MYCONSTANTHASAVALUE) ) echo "Where's the beef?"; else "Your stomach cancer stick is secure."; --------- This code snippet will work on php 4.2- (maybe 4.30 too). But it fails as of 4.3+. I had to retool a lot of old code. Guess I'll stick to the much shorter ! sign if ( !MYCONSTANTHASAVALUE ) ...

« previous php.notes (#52886) next »