By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

PHP Operators

Reference on PHP Operators. List of php operators, and a link to in-dept explernation.

Edited: 2015-12-04 10:33

A PHP Operator is something that you use when comparing values, or assigning values to variables. For example the equals sign is used when comparing two numbers. This is a list of all the Operators in PHP.

The equals sign is also used when assigning variables. For example:

// Assigning values to variables
$My_name = 'John'; // String
$Born = '1984'; // String
$Born = 1984; // Integer  (An integer is a number, is numeric)

When comparing values we can use an if statement:

if ($Born == 1984) {
  echo 'This guy was burn in 1984.';
} else {
  echo 'This guy was not born in 1984.';

See also: If statements in PHP


  1. Comparison Operators
  2. Assignment Operators