Types, Variables & Operators

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 includes various data types such as integer, double, string and many as like as other programming languages. In this tutorial, we are going to see PHP resource data type. But, unlike other data types, it is acting as a reference or an identifier to access resource data. For example, when we attempt to access […]
This tutorial was added to PHP.

↑ Back to Top