Types, Variables & Operators

Recent Tutorial

PHP Data Types

October 14, 2013
This is one boring topic we have in all programming languages – list of data types. It is so boring that no one cares to read it once completely. Sometimes surprisingly developers discover that they have not used a particular data type. Data types are generally used to represent the type of data associated with […]
This tutorial was added to PHP.

PHP Type Juggling

September 3, 2013
In many programming languages, declaring variables requires variable’s data type and the name of that variable. And then, variables will be initialized, on a need basis, with a value containing same data type as specified in the variable declaration. If any type mismatch occurs, then an exception will be thrown. Automatic Type Juggling in PHP […]
This tutorial was added to PHP.

PHP $_SERVER Variable

July 29, 2013
$_SERVER is one of the superglobal variables in PHP. It contains information about headers, server, host and etc. For that, it contains a huge list of information with appropriate global indices. With these global indices, the $_SERVER array contains values for the meta variables listed with the specification of common gateway interface. So, while running […]
This tutorial was added to PHP.

PHP Variable Varibles

June 13, 2013
Variable variables are the special features of PHP in PHP. It supports to store the name of a variable into a variable. It is used to change the variable name dynamically. Accessing Variables Variable Variables are start with double dolor($$) sign. It can be used in tree like access, {variable variables name} -> {variable name} […]
This tutorial was added to PHP.

PHP Scope Resolution Operator

June 10, 2013
Why is this called as scope resolution operator? This operator is used to refer the scope of some block or program context like classes, objects, namespace and etc. For this reference, an identifier is used with this operator to access or reproduce the code inside that scope. For example, in PHP, the scope resolution operators […]
This tutorial was added to PHP.

PHP Variables

May 17, 2013
Variable is an identifier used to store value. It can be changed or removed at any time. The variable name should start with a $ sign. The syntax is, $variable_name = value; While declaring a variable we need not specify its data type. In PHP, the data type of its value is taken as the […]
This tutorial was added to PHP.

PHP Type Hinting

May 12, 2013
As PHP is a loosely typed language, there is no need to specify a data type for variable declaration, function declaration or anywhere. But, using PHP5, we can specify the data type that is passed as arguments of PHP functions. This capability is called as type hinting. Advantages of PHP Type Hinting Using PHP type […]
This tutorial was added to PHP.

PHP Operators

May 9, 2013
Like other programming languages, PHP includes set of operators that are used to perform operations between one or more values. PHP has a variety of operators based on the operations to be performed. Each operator has precedence, depends on which order a PHP expression will be executed. Subexpressions that hold operators with higher precedence are […]
This tutorial was added to PHP.

PHP Globals with EGPCS Information

May 3, 2013
EGPCS is the variable parsing order configured as the value of the variable_order directive in the PHP configuration file. It is used to configure the order of PHP superglobal variables $_ENV, $_GET, $_POST, $_COOKIE and $_SERVER. These global array elements are merged together and stored in the $_REQUEST array. If we store values in EGPCS array with […]
This tutorial was added to PHP.

PHP Resource Data Type

May 2, 2013
PHP deals with various types of data like integer, double, string and etc. Resources are also coming under the list of PHP data types. But, unlike other data types,  resource identifiers are acting as a reference or identifier to access resource data provided by a third party external application. These resource data will be return while performing […]
This tutorial was added to PHP.

PHP Variable Interpolation

April 20, 2013
Variable interpolation is adding variables in between a string data. PHP will parse the interpolated variables and replace the variable with its value while processing the string data. The variable parsing is allowed with the string data enclosed with double quotes or with heredocs. Since, the variable interpolation will not be effective with the single quoted […]
This tutorial was added to PHP.

PHP Data Type Conversion

April 14, 2013
Datatype conversion is the process of changing the type of the variable from one datatype to another. PHP provides various datatypes and the type conversion can be performed in various methods. Since, PHP is a loosly typed language, it allows variable declaration without specifying its datatype. The datatype of a variable will be the type of […]
This tutorial was added to PHP.

PHP Variable Scope

April 12, 2013
Variable scope is known as its boundary within which it can be visible or accessed from code. In other words, it is the context within which a variable is defined. There are only two scopes available in PHP namely local and global scopes. Local variables (local scope) Global variables (special global scope) Static variables (local scope) Function […]
This tutorial was added to PHP.

↑ Back to Top