title: Cast string to integer in PHP
body: <p>I've been trying to convert string to int in PHP to operate on it, but PHP keeps interpreting it as 0.</p>
  
  <pre><code>var_dump ($Pux); // output: string (6) "89"
  </code></pre>
  
  <p>I have tried several ways like</p>
  
  <pre><code>(int) $Pux,
  intval($Pux)
  settype($Pux, "integer")
  </code></pre>
  
  <p>But they all give me 0 instead of 89.</p>
  
  <p>How should this be done?</p>