PHP » GoLang |
login |
register |
about
|
empty(PHP 4, PHP 5, PHP 7) empty — Determine whether a variable is empty Description
Determine whether a variable is considered to be empty. A variable is considered empty if it does not exist or if its value equals Parameters
Return Values
Returns The following values are considered to be empty:
Changelog
Examples
Example #1 A simple empty() / isset() comparison.
<?php Example #2 empty() on String Offsets PHP 5.4 changes how empty() behaves when passed string offsets.
<?php Output of the above example in PHP 5.3: bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) Output of the above example in PHP 5.4: bool(true) bool(false) bool(false) bool(false) bool(true) bool(true) Notes
See Also
|
more
Recently updated
more
Most requested
more
Last requests
|