public function asString() : string
    {
        $fractionDigits = $this->currency->getDefaultFractionDigits();

        $wholePart = substr((string)$this->amount, 0, -$fractionDigits) ?: '0';

        $fractionalPart = str_pad(substr((string)$this->amount, -$fractionDigits), $fractionDigits, '0', STR_PAD_RIGHT);

        return $wholePart . '.' . $fractionalPart;
    }
public function asString() : string
    {
        $fractionDigits = $this->currency->getDefaultFractionDigits();

        $wholePart = substr((string)$this->amount, 0, -$fractionDigits) ?: '0';

        $fractionalPart = str_pad(substr((string)$this->amount, -$fractionDigits), $fractionDigits, '0', STR_PAD_RIGHT);

        return $wholePart . '.' . $fractionalPart;
    }
public function asString ( ) : string { $ fractionDigits = $ this -> currency -> getDefaultFractionDigits ( ) ; $ wholePart = substr ( ( string ) $ this -> amount , 0 , - $ fractionDigits ) ? : '0' ; $ fractionalPart = str_pad ( substr ( ( string ) $ this -> amount , - $ fractionDigits ) , $ fractionDigits , '0' , STR_PAD_RIGHT ) ; return $ wholePart . '.' . $ fractionalPart ; }
Returns the monetary value as string.

@return string
Returns the monetary value as string .