original_string: public static function uniq($collection = null, $is_sorted = null, $iterator = null)
      {
          $return = array();
          if (count($collection) === 0) {
              return $return;
          }
          
          $calculated = array();
          foreach ($collection as $item) {
              $val = (!is_null($iterator)) ? $iterator($item) : $item;
              if (is_bool(array_search($val, $calculated, true))) {
                  $calculated[] = $val;
                  $return[] = $item;
              }
          }
          
          return $return;
      }
code: public static function uniq($collection = null, $is_sorted = null, $iterator = null)
      {
          $return = array();
          if (count($collection) === 0) {
              return $return;
          }
          
          $calculated = array();
          foreach ($collection as $item) {
              $val = (!is_null($iterator)) ? $iterator($item) : $item;
              if (is_bool(array_search($val, $calculated, true))) {
                  $calculated[] = $val;
                  $return[] = $item;
              }
          }
          
          return $return;
      }
code_tokens: public static function uniq ( $ collection = null , $ is_sorted = null , $ iterator = null ) { $ return = array ( ) ; if ( count ( $ collection ) === 0 ) { return $ return ; } $ calculated = array ( ) ; foreach ( $ collection as $ item ) { $ val = ( ! is_null ( $ iterator ) ) ? $ iterator ( $ item ) : $ item ; if ( is_bool ( array_search ( $ val , $ calculated , true ) ) ) { $ calculated [ ] = $ val ; $ return [ ] = $ item ; } } return $ return ; }
docstring: Return an array of the unique values
docstring_tokens: Return an array of the unique values