title: Working with PHP Octals and String conversions
body: <p>I'm working with a database that has a bunch of serial numbers that are prefixed with leading 0's. </p>
  
  <p>So a serial number can look like 00032432 or 56332432. </p>
  
  <p>Problem is with PHP I don't understand how the conversion system with octals works. </p>
  
  <p>A specific example is that I'm trying to convert and compare all of these integer based numbers with strings. </p>
  
  <p>Is it possible to convert an octal, such as 00234 to a string like "00234" so that I can compare it?</p>
  
  <p>edit - adding a specific example. I would like to be able to run str functions on the serial like below. </p>
  
  <pre><code>  $serial = 00032432; // coming from DB
  
    if(substr($serial, 0, 1) == '0') {
  
          // do something
  
     } 
  </code></pre>