!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)

/uploads/script/vendor/symfony/yaml/   drwxr-xr-x
Free 13.21 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:     Dumper.php (5.69 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Yaml;

use 
Symfony\Component\Yaml\Tag\TaggedValue;

/**
 * Dumper dumps PHP variables to YAML strings.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 *
 * @final
 */
class Dumper
{
    
/**
     * The amount of spaces to use for indentation of nested nodes.
     *
     * @var int
     */
    
protected $indentation;

    public function 
__construct(int $indentation 4)
    {
        if (
$indentation 1) {
            throw new 
\InvalidArgumentException('The indentation must be greater than zero.');
        }

        
$this->indentation $indentation;
    }

    
/**
     * Dumps a PHP value to YAML.
     *
     * @param mixed $input  The PHP value
     * @param int   $inline The level where you switch to inline YAML
     * @param int   $indent The level of indentation (used internally)
     * @param int   $flags  A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
     *
     * @return string The YAML representation of the PHP value
     */
    
public function dump($inputint $inline 0int $indent 0int $flags 0): string
    
{
        
$output '';
        
$prefix $indent str_repeat(' '$indent) : '';
        
$dumpObjectAsInlineMap true;

        if (
Yaml::DUMP_OBJECT_AS_MAP $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) {
            
$dumpObjectAsInlineMap = empty((array) $input);
        }

        if (
$inline <= || (!\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap) || empty($input)) {
            
$output .= $prefix.Inline::dump($input$flags);
        } else {
            
$dumpAsMap Inline::isHash($input);

            foreach (
$input as $key => $value) {
                if (
'' !== $output && "\n" !== $output[-1]) {
                    
$output .= "\n";
                }

                if (
Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK $flags && \is_string($value) && false !== strpos($value"\n") && false === strpos($value"\r")) {
                    
// If the first line starts with a space character, the spec requires a blockIndicationIndicator
                    // http://www.yaml.org/spec/1.2/spec.html#id2793979
                    
$blockIndentationIndicator = (' ' === substr($value01)) ? (string) $this->indentation '';

                    if (isset(
$value[-2]) && "\n" === $value[-2] && "\n" === $value[-1]) {
                        
$blockChompingIndicator '+';
                    } elseif (
"\n" === $value[-1]) {
                        
$blockChompingIndicator '';
                    } else {
                        
$blockChompingIndicator '-';
                    }

                    
$output .= sprintf('%s%s%s |%s%s'$prefix$dumpAsMap Inline::dump($key$flags).':' '-'''$blockIndentationIndicator$blockChompingIndicator);

                    foreach (
explode("\n"$value) as $row) {
                        if (
'' === $row) {
                            
$output .= "\n";
                        } else {
                            
$output .= sprintf("\n%s%s%s"$prefixstr_repeat(' '$this->indentation), $row);
                        }
                    }

                    continue;
                }

                if (
$value instanceof TaggedValue) {
                    
$output .= sprintf('%s%s !%s'$prefix$dumpAsMap Inline::dump($key$flags).':' '-'$value->getTag());

                    if (
Yaml::DUMP_MULTI_LINE_LITERAL_BLOCK $flags && \is_string($value->getValue()) && false !== strpos($value->getValue(), "\n") && false === strpos($value->getValue(), "\r\n")) {
                        
// If the first line starts with a space character, the spec requires a blockIndicationIndicator
                        // http://www.yaml.org/spec/1.2/spec.html#id2793979
                        
$blockIndentationIndicator = (' ' === substr($value->getValue(), 01)) ? (string) $this->indentation '';
                        
$output .= sprintf(' |%s'$blockIndentationIndicator);

                        foreach (
explode("\n"$value->getValue()) as $row) {
                            
$output .= sprintf("\n%s%s%s"$prefixstr_repeat(' '$this->indentation), $row);
                        }

                        continue;
                    }

                    if (
$inline <= || null === $value->getValue() || is_scalar($value->getValue())) {
                        
$output .= ' '.$this->dump($value->getValue(), $inline 10$flags)."\n";
                    } else {
                        
$output .= "\n";
                        
$output .= $this->dump($value->getValue(), $inline 1$dumpAsMap $indent $this->indentation $indent 2$flags);
                    }

                    continue;
                }

                
$dumpObjectAsInlineMap true;

                if (
Yaml::DUMP_OBJECT_AS_MAP $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) {
                    
$dumpObjectAsInlineMap = empty((array) $value);
                }

                
$willBeInlined $inline <= || !\is_array($value) && $dumpObjectAsInlineMap || empty($value);

                
$output .= sprintf('%s%s%s%s',
                    
$prefix,
                    
$dumpAsMap Inline::dump($key$flags).':' '-',
                    
$willBeInlined ' ' "\n",
                    
$this->dump($value$inline 1$willBeInlined $indent $this->indentation$flags)
                ).(
$willBeInlined "\n" '');
            }
        }

        return 
$output;
    }
}

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