note 101384 deleted from function.empty by danbrown
| From: | danbrown@php.net | Date: | Tue, 14 Dec 2010 15:29:11 +0000 |
| Subject: | note 101384 deleted from function.empty by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174908@lists.php.net to get a copy of this message | ||
Note Submitter: dmihov69 at gmail dot com
----
It took me an hour to reach this ...
<?php
$foo = array();
echo empty($foo)?'empty':'not empty';
$foo[]="";
var_dump($foo);
echo empty($foo)?'empty':'not empty';
/*output:
empty
array(1) { [0]=> string(0) "" }
not empty
*/
?>