note 126004 deleted from function.empty by cmb

From: Date: Tue, 13 Apr 2021 09:16:43 +0000
Subject: note 126004 deleted from function.empty by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-216278@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- From manual: "Returns false if var exists and has a non-empty, non-zero value, aka falsey, see conversion to boolean. Otherwise returns true." Returns FALSE if var exists even with data in it? Does the following prove otherwise or is the error mine? <!DOCTYPE html> <html> <body> <?php $arr = array();$arr[0] = 'fred'; $arr = array();$arr[1] = 'joe'; $arr = array();$arr[2] = 'tom'; $arrB = array(); if (empty($arr)) echo '<br> $arr true'; else echo '<br> else $arr false'; if (empty($arrB)) echo '<br> $arrB true'; else echo '<br> else $arrB false'; ?> </body> </html> // outputs // else $arr false // $arrB true

« previous php.notes (#216278) next »