title: php FILTER_CALLBACK with closure
body: <p>Trying to pass a closure into filter_var_array(), but can't seem to make it work.</p>
  
  <pre><code>$clean = function( $html ) {
      return HTML::sanitize( $html, array('p','ul','ol','li'), array('class','style') );
  };
  $args = array( 'filter' =&gt; FILTER_CALLBACK, 'options' =&gt; $clean );
  
  $fields = filter_var_array(
      array( $_POST['field1'], $_POST['field2'], $_POST['field3'] ),
      array( 'field1' =&gt; $args, 'field2' =&gt; $args, 'field3' =&gt; $args )
  );
  </code></pre>
  
  <p>After the above is run, $fields is an empty array.</p>
  
  <p>Note, individual filtering works fine:</p>
  
  <pre><code>$field1= filter_var( $_POST['field1'], FILTER_CALLBACK, array( 'options' =&gt; $clean ) );
  </code></pre>
  
  <p>Any ideas?</p>