!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/main_file/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Financial/   drwxr-xr-x
Free 13.23 GB of 57.97 GB (22.82%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Dollar.php (4.59 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace PhpOffice\PhpSpreadsheet\Calculation\Financial;

use 
PhpOffice\PhpSpreadsheet\Calculation\ArrayEnabled;
use 
PhpOffice\PhpSpreadsheet\Calculation\Exception;
use 
PhpOffice\PhpSpreadsheet\Calculation\Functions;
use 
PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
use 
PhpOffice\PhpSpreadsheet\Calculation\TextData\Format;

class 
Dollar
{
    use 
ArrayEnabled;

    
/**
     * DOLLAR.
     *
     * This function converts a number to text using currency format, with the decimals rounded to the specified place.
     * The format used is $#,##0.00_);($#,##0.00)..
     *
     * @param mixed $number The value to format, or can be an array of numbers
     *                         Or can be an array of values
     * @param mixed $precision The number of digits to display to the right of the decimal point (as an integer).
     *                            If precision is negative, number is rounded to the left of the decimal point.
     *                            If you omit precision, it is assumed to be 2
     *              Or can be an array of precision values
     *
     * @return array|string
     *         If an array of values is passed for either of the arguments, then the returned result
     *            will also be an array with matching dimensions
     */
    
public static function format($number$precision 2)
    {
        return 
Format::DOLLAR($number$precision);
    }

    
/**
     * DOLLARDE.
     *
     * Converts a dollar price expressed as an integer part and a fraction
     *        part into a dollar price expressed as a decimal number.
     * Fractional dollar numbers are sometimes used for security prices.
     *
     * Excel Function:
     *        DOLLARDE(fractional_dollar,fraction)
     *
     * @param mixed $fractionalDollar Fractional Dollar
     *              Or can be an array of values
     * @param mixed $fraction Fraction
     *              Or can be an array of values
     *
     * @return array|float|string
     */
    
public static function decimal($fractionalDollar null$fraction 0)
    {
        if (
is_array($fractionalDollar) || is_array($fraction)) {
            return 
self::evaluateArrayArguments([self::class, __FUNCTION__], $fractionalDollar$fraction);
        }

        try {
            
$fractionalDollar FinancialValidations::validateFloat(
                
Functions::flattenSingleValue($fractionalDollar) ?? 0.0
            
);
            
$fraction FinancialValidations::validateInt(Functions::flattenSingleValue($fraction));
        } catch (
Exception $e) {
            return 
$e->getMessage();
        }

        
// Additional parameter validations
        
if ($fraction 0) {
            return 
ExcelError::NAN();
        }
        if (
$fraction == 0) {
            return 
ExcelError::DIV0();
        }

        
$dollars = ($fractionalDollar 0) ? ceil($fractionalDollar) : floor($fractionalDollar);
        
$cents fmod($fractionalDollar1.0);
        
$cents /= $fraction;
        
$cents *= 10 ** ceil(log10($fraction));

        return 
$dollars $cents;
    }

    
/**
     * DOLLARFR.
     *
     * Converts a dollar price expressed as a decimal number into a dollar price
     *        expressed as a fraction.
     * Fractional dollar numbers are sometimes used for security prices.
     *
     * Excel Function:
     *        DOLLARFR(decimal_dollar,fraction)
     *
     * @param mixed $decimalDollar Decimal Dollar
     *              Or can be an array of values
     * @param mixed $fraction Fraction
     *              Or can be an array of values
     *
     * @return array|float|string
     */
    
public static function fractional($decimalDollar null$fraction 0)
    {
        if (
is_array($decimalDollar) || is_array($fraction)) {
            return 
self::evaluateArrayArguments([self::class, __FUNCTION__], $decimalDollar$fraction);
        }

        try {
            
$decimalDollar FinancialValidations::validateFloat(
                
Functions::flattenSingleValue($decimalDollar) ?? 0.0
            
);
            
$fraction FinancialValidations::validateInt(Functions::flattenSingleValue($fraction));
        } catch (
Exception $e) {
            return 
$e->getMessage();
        }

        
// Additional parameter validations
        
if ($fraction 0) {
            return 
ExcelError::NAN();
        }
        if (
$fraction == 0) {
            return 
ExcelError::DIV0();
        }

        
$dollars = ($decimalDollar 0.0) ? ceil($decimalDollar) : floor($decimalDollar);
        
$cents fmod($decimalDollar1);
        
$cents *= $fraction;
        
$cents *= 10 ** (-ceil(log10($fraction)));

        return 
$dollars $cents;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0072 ]--