Hi friends.

I have a little confusion when reading a php book.

In one of the first chapters, it teaches me about 'operator precedence'.

Here is the extract from the book:

Here ’ s a list of all the operators you ’ ve encountered so far, in order of precedence (highest first):

Precedence of Some PHP Operators (Highest First)

++ - - (increment/decrement)
(int) (float) (string) (array) (object) (bool) (casting)
! (not)
/ % (arithmetic)
+ - . (arithmetic)
< < = > > = < > (comparison)
== != === !== (comparison)
& & (and)
|| (or)
= += - =
= /= .= %= (assignment)
and
xor
or

......... the problem i am having is that I do not understand why (what appears to be) the concatenation operator is classed as an arithmetic operator?

I really don't get it. Can someone explain?

Paul.

    Write a Reply...