PHP Tutorial

A web server programming language.

PHP Operators

PHP Operators

Operators are used to perform operations on variables and values.

PHP divides operators in the following groups:

  • Arithmetic operators: + - * / % **
  • Assignment operators: = += -= *= /=
  • Comparison operators: == === != < > <= >=
  • Increment/Decrement operators: ++$x $x++ --$x $x--
  • Logical operators: and or xor && || !
  • String operators: . .=

Try It Yourself

Edit the code below and click Run to see the result live.

Source Code
Result
Topics