title: syntax error, unexpected T_FUNCTION on "use" operator
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9282066/how-can-i-use-php-closure-function-like-function-use-on-php-5-2-version">How can I use PHP closure function like function() use() on PHP 5.2 version?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to run this on a server that's running php 5.2.</p>
  
  <pre><code>function add_post_type($name, $args = array() ) {
  add_action('init',function() use($name, $args) { 
  
      // execute custom post type code here
  
  });
  };
  </code></pre>
  
  <p>The 2nd line is throwing an unexpected T_FUNCTION error, I suspect its cause of the "use" operator. Can someone help point me as to how I can rewrite this function to run in php 5.2?</p>