title: substr function returning wrong result in php
body: <p>I am a VB.NET developer working on a PHP project, I am trying to convert my VB.NET function into php, but not getting the desired result. After debugging I found a problem with substr function.</p>
  
  <p>in VB.NET I am using</p>
  
  <pre><code>mid(105,2,1) 
  This giving me output 0
  </code></pre>
  
  <p>but in php</p>
  
  <pre><code>substr(105,2,1)
  Giving me output 5
  </code></pre>