• PHP Video Tutorials

PHP Variable Handling Functions


Advertisements

PHP Variable Handling Functions are the inbuilt PHP library functions that enable us to manipulate and test php variables in various ways.

Installation

There is no installation needed to use PHP variable handling functions; they are part of the PHP core and comes alongwith standard PHP installation.

Runtime Configuration

This extension has no configuration directives defined in php.ini.

PHP Variable Handling Functions

Following table lists down all the functions related to PHP Variable Handling. Here column version indicates the earliest version of PHP that supports the function.

Sr.No Function & Description Version
1 boolval()

Function returns boolean value of a defined variable, i.e, it returns TRUE or FALSE.

5.5.0
2 debug_zval_dump()

Function is used to dump a string representation of an internal zend value to output.

4.2.0
3 doubleval()

Function is used to return the float value of a defined variable.

4, 5, 7, 8
4 empty()

Function is used to check if the defined variable has empty value.

4, 5, 7, 8
5 floatval()

Function used return the float value of a defined variable.

4.2.0, 5, 7, 8
6 get_defined_vars()

Function is used to return all the defined variables as an array.

4.0.4, 5, 7, 8
7 get_resource_id()

Function is used to return an integer identifier for the given resource.

8
8 get_resource_type()

Function returns the type a resource of the variable defined.

4.0.2, 5, 7, 8
9 gettype()

Function returns the type of the variable defined.

4, 5, 7, 8
10 intval()

Function returns integer value of the defined variable.

4, 5, 7, 8
11 is_array()

Function is used to check if the defined variable is an array.

4, 5, 7, 8
12 is_bool()

Function is used to check if the defined variable is boolean, i.e, it returns true or false value.

4, 5, 7, 8
13 is_callable()

Function is used to check if the data in the variable can be called as a function

4.0.6, 5, 7, 8
14 is_countable()

Function is used to check if the data in the variable is countable.

7.3.0, 8
15 is_double()

Function is used to check if the variable defined is of the type float

4, 5, 7, 8
16 is_float()

Function is used to check if the variable defined is an float

4, 5, 7, 8
17 is_int()

Function is used to check if the variable defined is of the type integer

4, 5, 7, 8
18 is_integer()

Function is used to check if the variable defined is an integer.

4, 5, 7, 8
19 is_iterable()

Function is used to check if the data in the variable is an iterable value.

7.1.0, 8
20 is_long()

Function is used to check if the variable is of the type integer.

4, 5, 7, 8
21 is_null()

Function checks if the variable has NULL value.

4.0.4, 5, 7, 8
22 is_numeric()

Function is used to check if the defined variable is numeric or a numeric string.

4, 5, 7, 8
23 is_object()

Function is used to check if the variable is an object.

4, 5, 7, 8
24 is_real()

Function is used to check if the defined variable is of the type float or not.

4, 5, 7, 8
25 is_resource()

Function is used to check if the defined variable is resource.

4, 5, 7, 8
26 is_scalar()

Function is used to check if the defined variable is scalar.

4.0.5, 5, 7, 8
27 is_string()

Function is used to check if the defined variable is of the type string.

4, 5, 7, 8
28 isset()

Function is used to check if a variable is declared and set.

4, 5, 7, 8
29 print_r()

Function used to represent or print the data of a variable into a readable format.

4, 5, 7, 8
30 serialize()

Function used to convert the data of a variable into a storable representation, so that the data can be stored in a file, a memory buffer

4, 5, 7, 8
31 settype()

Function is used to set a variable into a specific type.

4, 5, 7, 8
32 strval()

Function is used to return a string value of a variable.

4, 5, 7, 8
33 unserialize()

Function is used to unserialize the data of a variable. i.e, this function returns actual data of a serialize variable.

4, 5, 7, 8
34 unset()

Function used unset a variable

4, 5, 7, 8
35 var_dump()

Function is used to dump information about one or more variables. The information holds type and value of the variable(s).

4, 5, 7, 8
36 var_export()

Function returns structured information about a variable.

4.2.0, 5, 7, 8
php_function_reference.htm

Useful Video Courses


Video

PHP Online Training

45 Lectures 9 hours

Malhar Lathkar

Video

Become PHP Facebook Developer: Password-Less Authentication

34 Lectures 4 hours

Syed Raza

Video

Ultimate PHP & MySQL Web Development Course & OOP Coding

84 Lectures 5.5 hours

Frahaan Hussain

Video

Learn PHP from Scratch

17 Lectures 1 hours

Nivedita Jain

Video

E Commerce Website Development In PHP With PDO

100 Lectures 34 hours

Azaz Patel

Video

PHP in Telugu

43 Lectures 5.5 hours

Vijay Kumar Parvatha Reddy

Advertisements