title: Unexpected T_FUNCTION?
body: <p>I've question about solving in php version 5.2.7, where i get an error Parse error: syntax error, unexpected T_FUNCTION in /home/ ... /mainMenu.php on line 56. The code is</p>
  
  <pre><code>class MainMenu {
      ...
      private static function toRec($arr) {
          ...
  
          usort($newArr, function($a, $b) {//this was line 56
              return $a['nav_order'] - $b['nav_order'];
          });
          ...
      }
      ...
  
  }
  </code></pre>
  
  <p>What is alternative for php 5.2?</p>
  
  <p>Thank you</p>