表達式 | gettype() | empty() | is_null() | isset() | boolean : if($x) |
---|---|---|---|---|---|
$x = ""; | string | TRUE | FALSE | ||
$x = null; | NULL | ||||
var $x; | |||||
$x is undefined | |||||
$x = array(); | array | ||||
$x = false; | boolean | ||||
$x = true; | |||||
$x = 1; | integer | ||||
$x = 42; | |||||
$x = 0; | |||||
$x = -1; | |||||
$x = "1"; | |||||
$x = "0"; | |||||
$x = "-1"; | |||||
$x = "php"; | |||||
$x = "true"; | |||||
$x = "false"; |