public static function formataMoeda($value, $clean = true)
    {
        $value = (double)$value;

        return ($value || !$clean) ? number_format($value, 2, ',', '.') : '';
    }
public static function formataMoeda($value, $clean = true)
    {
        $value = (double)$value;

        return ($value || !$clean) ? number_format($value, 2, ',', '.') : '';
    }
public static function formataMoeda ( $ value , $ clean = true ) { $ value = ( double ) $ value ; return ( $ value || ! $ clean ) ? number_format ( $ value , 2 , ',' , '.' ) : '' ; }
Retorna valor no formato 000.000,00

@param  double $value
@param  bool   $clean

@return string
Retorna valor no formato 000 . 000 00