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


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

$config 
= [];

if (
PHP_VERSION_ID 80000) {
    
// GdImage not available before PHP8
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '~^Method .* has invalid return type GdImage\.$~',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Shared/Drawing.php',
        
'count' => 1,
    ];
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '~^Property .* has unknown class GdImage as its type\.$~',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php',
        
'count' => 1,
    ];
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '~^Method .* has invalid return type GdImage\.$~',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php',
        
'count' => 1,
    ];
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '~^Parameter .* of method .* has invalid type GdImage\.$~',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php',
        
'count' => 1,
    ];
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '~^Class GdImage not found\.$~',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Writer/Xls/Worksheet.php',
        
'count' => 1,
    ];
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '~^Parameter .* of method .* has invalid type GdImage\.$~',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Writer/Xls/Worksheet.php',
        
'count' => 1,
    ];
    
// GdImage with Phpstan 1.9.2
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '~Class GdImage not found.*$~',
        
'path' => __DIR__ '/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php',
        
'count' => 3,
    ];
    
// Erroneous analysis by Phpstan before PHP8 - 3rd parameter is nullable
    // Fixed for Php7 with Phpstan 1.9.
    //$config['parameters']['ignoreErrors'][] = [
    //    'message' => '#^Parameter \\#3 \\$namespace of method XMLWriter\\:\\:startElementNs\\(\\) expects string, null given\\.$#',
    //    'path' => __DIR__ . '/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php',
    //    'count' => 8,
    //];
    // Erroneous analysis by Phpstan before PHP8 - mb_strlen does not return false
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:countCharacters\\(\\) should return int but returns int(<0, max>)?\\|false\\.$#',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Shared/StringHelper.php',
        
'count' => 1,
    ];
    
// New with Phpstan 1.9.2 for Php7 only
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, array<int, mixed>\\|false given.$#',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Calculation/LookupRef/Sort.php',
        
'count' => 1,
    ];
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '#^Parameter \\#1 \\$input of function array_chunk expects array, array<int, float\\|int>\\|false given.$#',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php',
        
'count' => 1,
    ];
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '#^Parameter \\#2 \\$array of function array_map expects array, array<int, float|int>\\|false given.$#',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Calculation/MathTrig/Random.php',
        
'count' => 1,
    ];
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, array<int, mixed>\\|false given.$#',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Calculation/TextData/Text.php',
        
'count' => 1,
    ];
} else {
    
// Flagged in Php8+ - unsure how to correct code
    
$config['parameters']['ignoreErrors'][] = [
        
'message' => '#^Binary operation "/" between float and array[|]float[|]int[|]string results in an error.#',
        
'path' => __DIR__ '/src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php',
        
'count' => 1,
    ];
}

return 
$config;

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