usort

    private function compare_asc($a, $b){
        $value1 = $a->tx_price;
        $value2 = $b->tx_price;

        if($value1 == $value2){
            return 0;
        }elseif($value1 < $value2){
            return -1;
        }else{
            return 1;
        }
    }

    private function compare_desc($a, $b){
        if($a == $b){
            return 0;
        }

        if($a->tx_price > $b->tx_price){
            return -1;
        }else{
            return 1;
        }
    }

    private function collection2array($collection){
        $arr = [];
        foreach ($collection as $key => $item) {
            $arr[] = $item;
        }

        return $arr;
    }

    private function compare_string($a, $b){
        $v = strcmp($a->BEDNO, $b->BEDNO);
        if($v == 0){
            return 0;
        }

        if($v > 0){
            return 1;
        }else{
            return -1;
        }
    }

    public function test(){
        $future_id = 10;
        //$price = FutureM::get_price($future_id);
        $price = FutureM::get_price_by_id(19009);
        //logg($price);
        
        //logg($price);

        $buy_prices = ReportM::future5_buy_prices($price);
        $buy_prices = $this->collection2array($buy_prices);
        usort($buy_prices, array($this,'compare_desc'));
        logg($buy_prices);
    }