title: Why won't trim work as a callback for array_walk or array_map in PHP?
body: <p>Why does my sample code result in the first string still having a trailing space?</p>
  
  <pre><code>$a=array('test_data_1 ','test_data_2');
  array_walk($a, 'trim');
  array_map('trim', $a);                    
  foreach($a AS $b){
      var_dump($b);
  }
  </code></pre>
  
  <blockquote>
    <p>string(12) "test_data_1 " string(11) "test_data_2"</p>
  </blockquote>