recent searches:
include functions ,
variable functions ,
post functions...
If you are new to PHP or just need to refresh your skills, this is the place to start. This series of tutorials will give you the basic knowledge you will need to create a simple PHP website.
PHP is a reflective programming language originally designed for producing dynamic web pages.[1] PHP is used mainly in server-side scripting, but can be used from a command line interface or in standalone graphical applications. Textual User Interfaces can also be created using ncurses.
varVariable to be checked
Note: empty() only checks variables as anything else will result in a parse error. In other words, the following will not work: empty(trim($name)).
empty() is the opposite of
(boolean) var,
except that no warning is generated when the variable is not set.
Returns FALSE if var has a non-empty
and non-zero value.
The following things are considered to be empty:
| "" (an empty string) |
| 0 (0 as an integer) |
| "0" (0 as a string) |
| NULL |
| FALSE |
| array() (an empty array) |
| var $var; (a variable declared, but without a value in a class) |
Example 1. A simple empty() / isset() comparison.
|
Note: Because this is a language construct and not a function, it cannot be called using variable functions
Another Useful functions:
zend-macro.return-empty-unicode | zend-macro.return-empty-string | zend-macro.return-empty-binary | zend-api.zend-u-hash-add-empty-element | zend-api.zend-hash-add-empty-element | migration4.empty | function.empty |
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. If you are new to PHP and want to get some idea of how it works, try the introductory tutorial. After that, check out the online manual, and the example archive sites and some of the other resources available in the links section.