title: php combine 2 functions in class
body: <p>Im trying transfer this funcs in class</p>
  
  <pre><code>function trim_value(&amp;$value)
  {
      $value = trim($value);    // this removes whitespace and related characters from the beginning and end of the string
  }
  array_filter($_POST, 'trim_value');
  </code></pre>
  
  <p>Here my try:</p>
  
  <pre><code>public static function trimValue(&amp;$value)
  {
      $value = trim($value);
  }
  public static function trimArray($array)
  {
      array_filter($array, Request::trimValue);
  }
  </code></pre>
  
  <p>but not working, was trying with call_user_func, call_user_func_array, but not working too, help with solution please!</p>