title: PHP function missing argument error
body: <p>My validate function looks like that</p>
  
  <pre><code>function validate($data, $data2 = 0, $type)
  {
  ...
  </code></pre>
  
  <p>Function call example</p>
  
  <pre><code>if ($result = validate($lname, 'name') !== true)
          response(0, $result, 'lname');
  </code></pre>
  
  <p>As you see, my validate function has 3 input vars. I'm not using second var - $data2 often, that's why set it to 0 by default. But when I'm calling this function as given example (as far as I know it means $data=$lname, $data2=0, $type='name') getting error message</p>
  
  <pre><code>Missing argument 3 ($type) for validate() 
  </code></pre>
  
  <p>How can I fix that? </p>