public static function currency($number, array $options = array()) {
        $defaults = array(
            'thousands' => ',',
            'decimals' => '.',
            'places' => 2,
            'code' => 'USD #',
            'dollar' => '$#',
            'cents' => '#&cent;',
            'use' => 'dollar',
            'negative' => '(#)'
        );

        $options = $options + $defaults;
        $amount = number_format(static::precision(abs($number), $options['places']), $options['places'], $options['decimals'], $options['thousands']);

        // Cents
        if (($number < 1 && $number > -1) && $options['cents']) {
            $amount = str_replace('#', $amount, $options['cents']);

        // Dollars
        } else {
            if ($options['use'] === 'dollar') {
                $amount = str_replace('#', $amount, $options['dollar']);
            } else {
                $amount = str_replace('#', $amount, $options['code']);
            }
        }

        // Negative
        if ($number < 0 && $options['negative']) {
            $amount = str_replace('#', $amount, $options['negative']);
        }

        return $amount;
    }