title: How can I use PHP closure function like function() use() on PHP 5.2 version?
body: <p>How can I use PHP closure function like function() use() on PHP 5.2 version as it has no support for anonymous functions?</p>
  
  <p>Currently my code is something like below</p>
  
  <pre><code>$this-&gt;init(function() use($taxonomy_name, $plural, $post_type_name, $options)
  {
     // Override defaults with user provided options
  
      $options = array_merge(
         array(
            "hierarchical" =&gt; false,
            "label" =&gt; $taxonomy_name,
            "singular_label" =&gt; $plural,
            "show_ui" =&gt; true,
            "query_var" =&gt; true,
            "rewrite" =&gt; array("slug" =&gt; strtolower($taxonomy_name))
          ), $options
        );
  
        // name of taxonomy, associated post type, options
        register_taxonomy(strtolower($taxonomy_name), $post_type_name, $options);
  });
  </code></pre>