title: PHP convert string to int seems to give me 0
body: <pre><code>     &lt;?php $sizeh = '&lt;script type="text/javascript"&gt;
                      document.write(viewportheight);&lt;/script&gt;'; 
  
       echo $sizeh;
       echo  gettype ($num);
  
       $num = (int) $sizeh;
       //$num = intval($sizeh);
        echo  gettype ($num);
        echo $num;
  
   ?&gt;
  </code></pre>
  
  <p>This results is:</p>
  
  <pre><code>1083  string  integer   0
  </code></pre>
  
  <p>Why I am getting the value of zero while that zero should be 1083 ??</p>