PHP » GoLang |
login |
register |
about
|
isset(PHP 4, PHP 5, PHP 7) isset — Determine if a variable is set and is not Description
Determine if a variable is set and is not
If a variable has been unset with unset(), it will no
longer be set. isset() will return
If multiple parameters are supplied then isset() will
return Parameters
Return Values
Returns Changelog
Examples
Example #1 isset() Examples
<?php This also work for elements in arrays:
<?php Example #2 isset() on String Offsets PHP 5.4 changes how isset() behaves when passed string offsets.
<?php Output of the above example in PHP 5.3: bool(true) bool(true) bool(true) bool(true) bool(true) bool(true) Output of the above example in PHP 5.4: bool(false) bool(true) bool(true) bool(true) bool(false) bool(false) NotesWarning
isset() only works with variables as passing anything else will result in a parse error. For checking if constants are set use the defined() function.
See Also
|
more
Recently updated
more
Most requested
more
Last requests |