in reply to numbers with leading zeros
Compare the phone number as strings?
If you really want to compare a phone number as a number, add zero to the string representation of the number: $p = 0 + '0008'.