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 type of data associated with PHP […]
This tutorial was added to PHP.

PHP Type Juggling

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

PHP $_SERVER Variable

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

PHP Variable Varibles

June 13, 2013
Variable variables is the special features of PHP in PHP. It supports to store 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 this is 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 by any time. Variable name should start with a $ sign. The syntax is, $variable_name = value; While declaring variable we need not to specify its data type. In PHP, the data type of its value is taken as the variable […]
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 data type for variable declaration, function declaration or any where. But, using PHP5, we can specify data type that are passed as arguments of PHP functions. This capability is called as type hinting. Advantages of PHP Type Hinting Using PHP type hinting, […]
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 variety of operators based on the operations to be performed. Each operator has precedence, depends on which order an PHP expression will be executed. Sub expressions that hold operators with higher precedence, are […]
This tutorial was added to PHP.

PHP Globals with EGPCS Information

May 3, 2013
PHP contains so many predefined global variables which is called as super globals. These variables are started with an underscore (_) symbol, for example, $_GET, $_POST and etc. Unlike, user defined global variables, this kind of super globals can be accessed from PHP function without using global keyword or anything. Super globals used to contain […]
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
PHP supports interpolation of variables in between set of words to be printed to the browser using PHP output statements like echo(), print() and etc. There are two methods in variable interpolation. First method is to use variables in between string enclosed by double quotes which is shown as follows. $name = "PHPPOT"; echo "I […]
This tutorial was added to PHP.

PHP Data Type Conversion

April 14, 2013
In PHP, variable’s data type is taken depends on the value assigned to it. When this variable is used in some expression where there is an operand of different datatype, then, the type of this variable will automatically be converted at the time of evaluation. For example, If a variable is initialized as string, and used […]
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. Variable code is classified into two types. These are, Local scope Global scope Since scope restricts variable usage within its boundary, if we use a variable outside its scope it will cause PHP error Undefined Variable. Local Scope: […]
This tutorial was added to PHP.

↑ Back to Top