title: Proper way of converting string to long int in PHP
body: <p>I tried <code>(int) "4209531264"</code> and <code>intval("4209531264")</code>
  but sadly all I get is <code>2147483647</code> (I realize this is because of 32 bit architecture or some php dependencies or something).</p>
  
  <p>I came up with <code>"4209531264" + 0</code> which returns the correct result but it is surprising to see it working since it is beyond maxint.</p>
  
  <p>but the real question: is this the "right way" of converting string to long?</p>
  
  <p>edit:</p>
  
  <p><code>(float)</code> that is.</p>
  
  <p>thanks for the comments! eye opening!</p>