อ่านจากคู่มือมาครับ
http://php.net/manual/en/language.operators.comparison.php 
If you compare an integer with a string, the string is converted to a number. If you compare two numerical strings, they are compared as integers. These rules also apply to the switch statement.
- ถ้าเปรียบเทียบค่า ตัวเลขกับตัวหนังสือ ค่าที่เป็นตัวหนังสือจะถูกแปลงเป็นตัวเลขก่อนครับ
ซึ่งวิธีแปลงจากตัวหนังสือเป็นตัวเลข อ้างจาก
http://www.php.net/manual/en/l...nguage.types.string.conversion 
If the string starts with valid numeric data, this will be the value used. Otherwise, the value will be 0 (zero).
-ถ้าตัวหนังสือขึ้นต้นด้วยตัวเลข ค่านี้จะถูกนำมาแปลงเป้นตัวเลข แต่ถ้าเป็นตัวหนังสือที่ไม่ใช่ตัวเลขจะแปลงเป็น 0 ทั้งหมด
นั่นก็คือ $a จะถูกแปลง เป็น 0 ทำให้ 0 == 0 เป็นจริงครับ
