title: Is it better to typecast 2 strings to int before comparison?
body: <pre class="lang-php prettyprint-override"><code>$a = '1';
  $b = '1';
  
  // Method 1
  if ($a == $b) { ... }
  
  // Method 2
  if ((int)$a == (int)$b) { ... }
  </code></pre>
  
  <p>Which is the better solution? I'm thinking here of programming best practices and not necessarily performance. </p>