title: Building custom PHP extension (.so)
body: <p>I own a high traffic website that does business in the USA and Canada. We have lots of servers but I want to make sure it's 100% available with no latency whatsoever.</p>
  
  <p>I've learned about creating custom extensions (I know a little C) and I want to create custom validation/files (since php extensions runs faster).</p>
  
  <p>I don't want to ask for all new extensions from you guys but I want to know the general idea on how to build it (I am using CentOS).</p>
  
  <p>Example:</p>
  
  <p>One section of our site is the shipping tracking and this require a postal code.</p>
  
  <p>For the USA I have:</p>
  
  <pre><code>function check_usa_postal_code($pc) {
    return is_numeric($pc);
  }
  </code></pre>
  
  <p>But for Canada, I would like to build in PHP a custom function like:</p>
  
  <p><code>check_canada_postal_code($pc)</code></p>
  
  <p>This function should return 1 or 0.</p>
  
  <p>Thanks</p>