This is discussed in the PHP Manual.
String conversion to numbers
When a string is evaluated in a numeric context, the resulting value
and type are determined as follows.
The string will be evaluated as a float if it contains any of the
characters '.', 'e', or 'E'. Otherwise, it will be evaluated as an
integer.
The value is given by the initial portion of the string. If the string
starts with valid numeric data, this will be the value used.
Otherwise, the value will be 0 (zero). Valid numeric data is an
optional sign, followed by one or more digits (optionally containing a
decimal point), followed by an optional exponent. The exponent is an
'e' or 'E' followed by one or more digits.
Note the part that states
If the string starts with valid numeric data, this will be the value
used.
Since your string starts with 32
PHP will compare if(32 == 32)
which will be true.
Use type safe checks, that takes the datatype into consideration, when dealing with types that could be different if this behaviour is not desired. Like
1 === 1: true
1 == 1: true
1 === "1": false
1 == "1": true
"foo" === "foo": true