original_string: public static function sortByKey($_array, $key) {
          $array = $_array;
          $result = usort($array, function($a, $b) use ($key) {
              return strcmp(call_user_func(array($a, $key)),
                            call_user_func(array($b, $key)));
          });
          if (!$result)
              throw new ArrayException("sorting by \"$key\" failed");
          return $array;
      }
code: public static function sortByKey($_array, $key) {
          $array = $_array;
          $result = usort($array, function($a, $b) use ($key) {
              return strcmp(call_user_func(array($a, $key)),
                            call_user_func(array($b, $key)));
          });
          if (!$result)
              throw new ArrayException("sorting by \"$key\" failed");
          return $array;
      }
code_tokens: public static function sortByKey ( $ _array , $ key ) { $ array = $ _array ; $ result = usort ( $ array , function ( $ a , $ b ) use ( $ key ) { return strcmp ( call_user_func ( array ( $ a , $ key ) ) , call_user_func ( array ( $ b , $ key ) ) ) ; } ) ; if ( ! $ result ) throw new ArrayException ( "sorting by \"$key\" failed" ) ; return $ array ; }
docstring: Sorts an array in ascending order regarding a member.
  @param array $_array
  @param callable $key
  @return array
docstring_tokens: Sorts an array in ascending order regarding a member .