2.5. Operators

PHP, like many other programming languages, provides a number of operators that allow you to manipulate data. These operators fall into several categories; this book walks you through taking advantage of the following operators:

  • Arithmetic Operators: These perform basic mathematical functions

  • Arithmetic Assignment Operators: These set expression values

  • Comparison Operators: These determine the similarity of two values

  • Error Control Operators: These special operators to suppress errors

  • Incrementing/Decrementing Operators: These increase or decrease a value

  • Logical Operators: These denote logical operations; examples include AND and OR

  • String Operators: These manipulate strings

2.5.1. Arithmetic Operators

The arithmetic operators in ...

Get PHP for Absolute Beginners now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.