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

Software: Apache. PHP/8.3.27 

uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 

uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364)  

Safe-mode: OFF (not secure)

/usr/local/wp/vendor/wp-cli/profile-command/src/   drwxr-xr-x
Free 720.03 GB of 879.6 GB (81.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace WP_CLI\Profile;

class Logger {

    public $time                = 0;
    public $query_count         = 0;
    public $query_time          = 0;
    public $cache_hits          = 0;
    public $cache_misses        = 0;
    public $cache_ratio         = null;
    public $hook_count          = 0;
    public $hook_time           = 0;
    public $request_count       = 0;
    public $request_time        = 0;
    private $start_time         = null;
    private $query_offset       = null;
    private $cache_hit_offset   = null;
    private $cache_miss_offset  = null;
    private $hook_start_time    = null;
    private $hook_depth         = 0;
    private $request_start_time = null;

    private $definitions = array();

    public static $active_loggers = array();

    public function __construct( $definition = array() ) {
        foreach ( $definition as $k => $v ) {
            $this->definitions[ $k ] = $v;
        }
    }

    public function __get( $key ) {
        if ( isset( $this->definitions[ $key ] ) ) {
            return $this->definitions[ $key ];
        }

        return null;
    }

    public function __set( $key, $value ) {
        $this->definitions[ $key ] = $value;
    }

    public function __isset( $key ) {
        return isset( $this->definitions[ $key ] );
    }

    /**
     * Start this logger
     */
    public function start() {
        global $wpdb, $wp_object_cache;
        $this->start_time   = microtime( true );
        $this->query_offset = ! empty( $wpdb->queries ) ? count( $wpdb->queries ) : 0;
        $key                = array_search( $this, self::$active_loggers, true );

        if ( false === $key ) {
            self::$active_loggers[] = $this;
        }
        $this->cache_hit_offset  = ! empty( $wp_object_cache->cache_hits ) ? $wp_object_cache->cache_hits : 0;
        $this->cache_miss_offset = ! empty( $wp_object_cache->cache_misses ) ? $wp_object_cache->cache_misses : 0;
    }

    /**
     * Whether or not the logger is running
     */
    public function running() {
        return ! is_null( $this->start_time );
    }

    /**
     * Stop this logger
     */
    public function stop() {
        global $wpdb, $wp_object_cache;

        if ( ! is_null( $this->start_time ) ) {
            $this->time += microtime( true ) - $this->start_time;
        }
        if ( ! is_null( $this->query_offset ) && isset( $wpdb ) && ! empty( $wpdb->queries ) ) {

            $query_total_count = count( $wpdb->queries );

            for ( $i = $this->query_offset; $i < $query_total_count; $i++ ) {
                $this->query_time += $wpdb->queries[ $i ][1];
                ++$this->query_count;
            }
        }

        if ( ! is_null( $this->cache_hit_offset ) && ! is_null( $this->cache_miss_offset ) && isset( $wp_object_cache ) ) {
            $cache_hits         = ! empty( $wp_object_cache->cache_hits ) ? $wp_object_cache->cache_hits : 0;
            $cache_misses       = ! empty( $wp_object_cache->cache_misses ) ? $wp_object_cache->cache_misses : 0;
            $this->cache_hits   = $cache_hits - $this->cache_hit_offset;
            $this->cache_misses = $cache_misses - $this->cache_miss_offset;
            $cache_total        = $this->cache_hits + $this->cache_misses;
            if ( $cache_total ) {
                $ratio             = ( $this->cache_hits / $cache_total ) * 100;
                $this->cache_ratio = round( $ratio, 2 ) . '%';
            }
        }

        $this->start_time        = null;
        $this->query_offset      = null;
        $this->cache_hit_offset  = null;
        $this->cache_miss_offset = null;
        $key                     = array_search( $this, self::$active_loggers, true );

        if ( false !== $key ) {
            unset( self::$active_loggers[ $key ] );
        }
    }

    /**
     * Start this logger's hook timer
     */
    public function start_hook_timer() {
        ++$this->hook_count;
        // Timer already running means a subhook has been called
        if ( ! is_null( $this->hook_start_time ) ) {
            ++$this->hook_depth;
        } else {
            $this->hook_start_time = microtime( true );
        }
    }

    /**
     * Stop this logger's hook timer
     */
    public function stop_hook_timer() {
        if ( $this->hook_depth ) {
            --$this->hook_depth;
        } else {
            if ( ! is_null( $this->hook_start_time ) ) {
                $this->hook_time += microtime( true ) - $this->hook_start_time;
            }
            $this->hook_start_time = null;
        }
    }

    /**
     * Start this logger's request timer
     */
    public function start_request_timer() {
        ++$this->request_count;
        $this->request_start_time = microtime( true );
    }

    /**
     * Stop this logger's request timer
     */
    public function stop_request_timer() {
        if ( ! is_null( $this->request_start_time ) ) {
            $this->request_time += microtime( true ) - $this->request_start_time;
        }
        $this->request_start_time = null;
    }
}

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