|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[1999-05-27 10:31 UTC] aulbach at unter dot franken dot de
Perhaps it is a documentation error:
<?
$val='';
if (empty($val) || ''==$val)
echo "empty(): EMPTY<BR>";
else
echo "empty(): NOT EMPTY<BR>";
if (!isset($val))
echo "isset(): EMPTY<BR>";
else
echo "isset(): NOT EMPTY<BR>";
?>
Results:
empty(): EMPTY
isset(): NOT EMPTY
If I read the docs, then empty() should be !isset(), so the result must be the same
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 12:00:01 2026 UTC |
oops, of course the if (empty($val) || ''==$val) is a little bit corrupted, should be replaced by if (empty($val)) But the result is the same.