title: Explanation for very odd php function return
body: <p>So my code in the past needed a variable to run through 2 functions and then return the value as such.</p>
  
  <pre><code> function 1($variable) {
      check($variable);
      return $variable // either a -1, -2 or true;
   }
  
   // pass the return to next function
  
  function 2($variable) {
      check($variable);
      return $variable // either a -1, -2 or true;
  }
  </code></pre>
  
  <p>On the next check it returns a message to the user as such:</p>
  
  <pre><code>  if($variable == -1) // display message
    if($variable == -2) // display message
    if($variable == true) // display message
  </code></pre>
  
  <p>Now, per requirement of work the variable must go through a 3rd function check still returning a -1, -2 or true and then go onto the final if statements for display.
  Now this is where it gets odd. If I keep it at 2 functions the if statements work, however if I run it through the 3rd check function I need to format my if's like this in order to correctly check the return: </p>
  
  <pre><code>if($variable === -1) // display message
  if($variable === -2) // display message
  if($variable === true) // display message
  </code></pre>
  
  <p>Notice I have to add the 3rd '=' symbol. I just can't figure out why this is happening. Is this normal by some PHP law I don't know about or is this a bug?</p>