- PHP Tutorial
- PHP - Home
- PHP - Introduction
- PHP - Installation
- PHP - History
- PHP - Features
- PHP - Syntax
- PHP - Hello World
- PHP - Comments
- PHP - Variables
- PHP - Echo/Print
- PHP - var_dump
- PHP - $ and $$ Variables
- PHP - Constants
- PHP - Magic Constants
- PHP - Data Types
- PHP - Type Casting
- PHP - Type Juggling
- PHP - Strings
- PHP - Boolean
- PHP - Integers
- PHP - Files & I/O
- PHP - Maths Functions
- PHP - Heredoc & Nowdoc
- PHP - Compound Types
- PHP - File Include
- PHP - Date & Time
- PHP - Scalar Type Declarations
- PHP - Return Type Declarations
- PHP Operators
- PHP - Operators
- PHP - Arithmatic Operators
- PHP - Comparison Operators
- PHP - Logical Operators
- PHP - Assignment Operators
- PHP - String Operators
- PHP - Array Operators
- PHP - Conditional Operators
- PHP - Spread Operator
- PHP - Null Coalescing Operator
- PHP - Spaceship Operator
- PHP Control Statements
- PHP - Decision Making
- PHP - If…Else Statement
- PHP - Switch Statement
- PHP - Loop Types
- PHP - For Loop
- PHP - Foreach Loop
- PHP - While Loop
- PHP - Do…While Loop
- PHP - Break Statement
- PHP - Continue Statement
- PHP Arrays
- PHP - Arrays
- PHP - Indexed Array
- PHP - Associative Array
- PHP - Multidimensional Array
- PHP - Array Functions
- PHP - Constant Arrays
- PHP Functions
- PHP - Functions
- PHP - Function Parameters
- PHP - Call by value
- PHP - Call by Reference
- PHP - Default Arguments
- PHP - Named Arguments
- PHP - Variable Arguments
- PHP - Returning Values
- PHP - Passing Functions
- PHP - Recursive Functions
- PHP - Type Hints
- PHP - Variable Scope
- PHP - Strict Typing
- PHP - Anonymous Functions
- PHP - Arrow Functions
- PHP - Variable Functions
- PHP - Local Variables
- PHP - Global Variables
- PHP Superglobals
- PHP - Superglobals
- PHP - $GLOBALS
- PHP - $_SERVER
- PHP - $_REQUEST
- PHP - $_POST
- PHP - $_GET
- PHP - $_FILES
- PHP - $_ENV
- PHP - $_COOKIE
- PHP - $_SESSION
- PHP File Handling
- PHP - File Handling
- PHP - Open File
- PHP - Read File
- PHP - Write File
- PHP - File Existence
- PHP - Download File
- PHP - Copy File
- PHP - Append File
- PHP - Delete File
- PHP - Handle CSV File
- PHP - File Permissions
- PHP - Create Directory
- PHP - Listing Files
- Object Oriented PHP
- PHP - Object Oriented Programming
- PHP - Classes and Objects
- PHP - Constructor and Destructor
- PHP - Access Modifiers
- PHP - Inheritance
- PHP - Class Constants
- PHP - Abstract Classes
- PHP - Interfaces
- PHP - Traits
- PHP - Static Methods
- PHP - Static Properties
- PHP - Namespaces
- PHP - Object Iteration
- PHP - Encapsulation
- PHP - Final Keyword
- PHP - Overloading
- PHP - Cloning Objects
- PHP - Anonymous Classes
- PHP Web Development
- PHP - Web Concepts
- PHP - Form Handling
- PHP - Form Validation
- PHP - Form Email/URL
- PHP - Complete Form
- PHP - File Inclusion
- PHP - GET & POST
- PHP - File Uploading
- PHP - Cookies
- PHP - Sessions
- PHP - Session Options
- PHP - Sending Emails
- PHP - Sanitize Input
- PHP - Post-Redirect-Get (PRG)
- PHP - Flash Messages
- PHP AJAX
- PHP - AJAX Introduction
- PHP - AJAX Search
- PHP - AJAX XML Parser
- PHP - AJAX Auto Complete Search
- PHP - AJAX RSS Feed Example
- PHP XML
- PHP - XML Introduction
- PHP - Simple XML Parser
- PHP - SAX Parser Example
- PHP - DOM Parser Example
- PHP Login Example
- PHP - Login Example
- PHP - Facebook Login
- PHP - Paypal Integration
- PHP - MySQL Login
- PHP Advanced
- PHP - MySQL
- PHP.INI File Configuration
- PHP - Array Destructuring
- PHP - Coding Standard
- PHP - Regular Expression
- PHP - Error Handling
- PHP - Try…Catch
- PHP - Bugs Debugging
- PHP - For C Developers
- PHP - For PERL Developers
- PHP - Frameworks
- PHP - Core PHP vs Frame Works
- PHP - Design Patterns
- PHP - Filters
- PHP - JSON
- PHP - Exceptions
- PHP - Special Types
- PHP - Hashing
- PHP - Encryption
- PHP - is_null() Function
- PHP - System Calls
- PHP - HTTP Authentication
- PHP - Swapping Variables
- PHP - Closure::call()
- PHP - Filtered unserialize()
- PHP - IntlChar
- PHP - CSPRNG
- PHP - Expectations
- PHP - Use Statement
- PHP - Integer Division
- PHP - Deprecated Features
- PHP - Removed Extensions & SAPIs
- PHP - PEAR
- PHP - CSRF
- PHP - FastCGI Process
- PHP - PDO Extension
- PHP - Built-In Functions
- PHP Useful Resources
- PHP - Questions & Answers
- PHP - Quick Guide
- PHP - Useful Resources
- PHP - Discussion
PHP Variable Handling Functions
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 |