public static function percentage($number, $options = array()) {
        if (!is_array($options)) {
            $options = array('places' => $options);
        }

        $options = $options + array(
            'thousands' => ',',
            'decimals' => '.',
            'places' => 2
        );

        return number_format(static::precision($number, $options['places']), $options['places'], $options['decimals'], $options['thousands']) . '%';
    }
public static function percentage($number, $options = array()) {
        if (!is_array($options)) {
            $options = array('places' => $options);
        }

        $options = $options + array(
            'thousands' => ',',
            'decimals' => '.',
            'places' => 2
        );

        return number_format(static::precision($number, $options['places']), $options['places'], $options['decimals'], $options['thousands']) . '%';
    }
public static function percentage ( $ number , $ options = array ( ) ) { if ( ! is_array ( $ options ) ) { $ options = array ( 'places' => $ options ) ; } $ options = $ options + array ( 'thousands' => ',' , 'decimals' => '.' , 'places' => 2 ) ; return number_format ( static :: precision ( $ number , $ options [ 'places' ] ) , $ options [ 'places' ] , $ options [ 'decimals' ] , $ options [ 'thousands' ] ) . '%' ; }
Convert a number to a percentage string with decimal and comma separations.

@param int $number
@param int|array $options {
@type string $thousands Character used for thousands place
@type string $decimals  Character used for decimal
@type int $places       Decimal (cent) limit
}
@return string
Convert a number to a percentage string with decimal and comma separations .