Here are the most important comparison operators of PHP.
Assume: $x = 4 and $y = 5; This combination assignment/arithmetic operator would accomplish the same task.
However, with the pre-increment " $x" the variable does reflect the addition immediately.
If you would rather download the PDF of this tutorial, check out our PHP e Book from the store.
There are a few other Operators that tend to do some arithmetic operations and store the result in same.
for eg the addition-assignment operator, represented by the symbol =, lets you simultaneously add and assign a new value to a variable.
It's the standard way to, for example, make part of one array or object mirror changes made to another, instead of copying the existing data.
It's called assignment by reference, which, to quote the manual, "means that both variables end up pointing at the same data, and nothing is copied anywhere".
$x ; echo " The value of x after the post-plusplus is " .
$x; $x = 4; echo "The value of x with with pre-plusplus = " .