if operator

The if construct is one of the most important features of many languages, PHP included. It allows for conditional execution of code fragments. PHP features

Type Operators

instanceof is used to determine whether a PHP variable is an instantiated object of a certain class: Example #1 Using instanceof with classes <?php class

Array Operators

Array Operators Example Name Result $a + $b Union Union of $a and $b. $a == $b Equality TRUE if $a and $b have the

String Operators

There are two string operators. The first is the concatenation operator (‘.’), which returns the concatenation of its right and left arguments. The second is

Execution Operators

PHP supports one execution operator: backticks («). Note that these are not single-quotes! PHP will attempt to execute the contents of the backticks as a

Error Control Operators

PHP supports one error control operator: the at sign (@). When prepended to an expression in PHP, any error messages that might be generated by

Comparison Operators

Comparison operators, as their name implies, allow you to compare two values. You may also be interested in viewing the type comparison tables, as they

Bitwise operators

Bitwise operators allow evaluation and manipulation of specific bits within an integer. Bitwise Operators Example Name Result $a & $b And Bits that are set

Assignment Operators on PHP

The basic assignment operator is «=». Your first inclination might be to think of this as «equal to». Don’t. It really means that the left

Arithmetic Operators on PHP

Remember basic arithmetic from school? These work just like those. Arithmetic Operators Example Name Result -$a Negation Opposite of $a. $a + $b Addition Sum