I have this code:
echo ( $arr['process_refunds'] == 'storecredit' ) ? 'true' : 'false'
The value in $arr['process_refunds']
is 0
type int(0)
.
It tried in php -a
and it turns out that if we compare any string with
==
with int(0)
it evaluates to true
.
Why is that?