NULL, the special value on PHP

The special NULL value represents a variable with no value. NULL is the only possible value of type NULL. Note: The null type was introduced

Object Initialization on PHP

To create a new object, use the new statement to instantiate a class: <?php class foo { function do_foo() { echo «Doing foo.»; } }

Arrays on PHP

An array in PHP is actually an ordered map. A map is a type that associates values to keys. This type is optimized for several

Strings on PHP

A string is series of characters, therefore, a character is the same as a byte. That is, there are exactly 256 different characters possible. This

Floating point numbers

Floating point numbers (also known as «floats», «doubles», or «real numbers») can be specified using any of the following syntaxes: <?php $a = 1.234; $b

Integers on PHP

An integer is a number of the set ? = {…, -2, -1, 0, 1, 2, …}. Syntax Integers can be specified in decimal (base

PHP supports eight primitive types.

Four scalar types: boolean integer float (floating-point number, aka double) string Two compound types: array object And finally two special types: resource NULL This manual

Booleans on PHP

This is the simplest type. A boolean expresses a truth value. It can be either TRUE or FALSE. Note: The boolean type was introduced in

Comments on PHP

PHP supports ‘C’, ‘C++’ and Unix shell-style (Perl style) comments. For example: <?php echo ‘This is a test’; // This is a one-line c++ style

Escaping from HTML fron PHP

When PHP parses a file, it looks for opening and closing tags, which tell PHP to start and stop interpreting the code between them. Parsing