array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'en', ), 'this' => array ( 0 => 'function.filter-has-var.php', 1 => 'filter_has_var', 2 => 'Checks if a variable of the specified type exists', ), 'up' => array ( 0 => 'ref.filter.php', 1 => 'Filter Functions', ), 'prev' => array ( 0 => 'ref.filter.php', 1 => 'Filter Functions', ), 'next' => array ( 0 => 'function.filter-id.php', 1 => 'filter_id', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/filter/functions/filter-has-var.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

filter_has_var

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

filter_has_varChecks if a variable of the specified type exists

Description

filter_has_var(int $input_type, string $var_name): bool

Parameters

input_type

One of INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV.

var_name

Name of a variable to check.

Return Values

Returns true on success or false on failure.