title: Does this simple PHP function wrapper look sensible for its purpose?
body: <p>Being new to PHP, and with a lot riding on this "function wrapper", I thought I'd get a few opinions and a little feedback.  I'd like to get about five comments, if possible.</p>
  
  <p>Now before you ask, I have many reasons for wanting to wrap other (WordPress) functions, the primary being hassle-free upgrading. It was also important for me to be able to set a custom name for each function definition, hence the <code>$wrap array</code>.</p>
  
  <p>But I digress, does this look acceptable and relatively bulletproof?</p>
  
  <pre><code>function core_oo( $function )
  {
      $args = array_slice( func_get_args(), 1 );
      $wrap = array
      (
          'comment' =&gt; 'the_comment',
          'comments' =&gt; 'have_comments',
          'post' =&gt; 'the_post',
          'posts' =&gt; 'have_posts'
      );
      return call_user_func_array( $wrap[ $function ], $args );
  }
  </code></pre>
  
  <p>... and the function will be called like...</p>
  
  <pre><code>core_oo( 'post', 'arg1', 'arg2' );
  </code></pre>
  
  <p>Many thanks!</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Per chaos's sugeestion below, is this the right way to declare $wrap as static?</p>
  
  <pre><code>static $wrap = array
  ( ...
  </code></pre>