-2
<?php
    $st = 'fgh';
    if($st == 1 || $st == 0){
      echo "IN";
    }
?>

Working Example

Why This echo IN ??? I'm not able to understand...

Rao DYC
  • 146
  • 11

1 Answers1

0

Because you typecast $st to integer and (int) $st is equal to 0.

Working example

Justinas
  • 41,402
  • 5
  • 66
  • 96