title: PHP Functions, null default parameters
body: <p>I have a PHP function signature that looks like this, where I want the 4th param to be NULL by default if nothing is supplied.</p>
  
  <pre><code>testfunction($param1, $param2, $param3, $param4=NULL) {
      //do stuff
  }
  </code></pre>
  
  <p>I can also call using 4 params as such</p>
  
  <pre><code>x = testfunction('100', 'abc', 'xxx', null);
  </code></pre>
  
  <p>Why is it that I can also call the function using 3 parameters without any errors?</p>
  
  <pre><code>x = testfunction('100', 'abc', 'xxx');
  </code></pre>
  
  <p>Is what i'm doing even correct (using 3 params)? Any thoughts about how this relates to traditional method overloading where separate function signatures are defined?</p>
  
  <p>My question is general in nature. Hope someone can shed some light on and around it.</p>