empty() returns FALSE if var has a non-empty and non-zero value. In otherwords, "", 0, "0", NULL, FALSE, array(), var $var;, and objects with empty properties, are all considered empty. TRUE is returned if var is empty.
empty() is the opposite of (boolean) var, except that no warning is generated when the variable is not set. See converting to boolean for more information.
Пример 1. A simple empty() / isset() comparison.
|
Замечание: оНЯЙНКЭЙС ЩРН ЪГШЙНБЮЪ ЙНМЯРПСЙЖХЪ, Ю МЕ ТСМЙЖХЪ, НМЮ МЕ ЛНФЕР БШГШБЮРЭЯЪ ОПХ ОНЛНЫХ ОЕПЕЛЕММШУ ТСМЙЖХИ
Замечание: empty() only checks variables as anything else will result in a parse error. In otherwords, the following will not work: empty(addslashes($name)).
See also isset(), unset(), array_key_exists(), count(), strlen(), and the type comparison tables.
Пред. | Начало | След. |
doubleval | Уровень выше | floatval |
HIVE: All information for read only. Please respect copyright! |