Thursday, April 3, 2014

Variable handling Functions

filter, sanitize, escape, check, fallbacks to feedback and prevent input disaster.

Variable and Type Related Extensions

Variable handling Functions


(PHP 4, PHP 5)
var_dump — Dumps information about a variable


print_r() - Prints human-readable information about a variable

debug_zval_dump() - Dumps a string representation of an internal zend value to output
var_export() - Outputs or returns a parsable string representation of a variable

Variable Validated PHP Functions

(PHP 4, PHP 5)
emptyDetermine whether a variable is empty

isset() - Determine if a variable is set and is not NULL
__isset()
unset() - Unset a given variable
array_key_exists() - Checks if the given key or index exists in the array
count() - Count all elements in an array, or something in an object
strlen() - Get string length

Is PHP function Variable Checking / Validate

is_array
is_bool
is_callable
is_double
is_float
is_int
is_integer
is_long
is_null
is_numeric
is_object
is_real
is_resource
is_scalar
is_string



PHP type comparison tables

(PHP 4, PHP 5)
gettype — Get the type of a variable
(PHP 4, PHP 5)
emptyDetermine whether a variable is empty

http://www.php.net/manual/en/types.comparisons.php


Others

get_class() - Returns the name of the class of an object
function_exists() - Return TRUE if the given function has been defined
method_exists() - Checks if the class method exists
defined()
Similar:
PHP Class Function Validate

PHP function Variable Checking / Validate

php validate exist

No comments:

Post a Comment