public function cpu_info($parse = true)
    {
        $lines = trim(shell_exec('lscpu'));
        
        if (!$parse) {
            return $lines;
        }
        
        if (empty($lines)) {
            return [];
        }
        
        $lines = explode(PHP_EOL, $lines);
        
        $return = [];
        foreach ($lines as $line) {
            $parts = explode(':', $line);
            $return[trim($parts[0])] = trim($parts[1]);
        }

        return $return;
    }
public function cpu_info($parse = true)
    {
        $lines = trim(shell_exec('lscpu'));
        
        if (!$parse) {
            return $lines;
        }
        
        if (empty($lines)) {
            return [];
        }
        
        $lines = explode(PHP_EOL, $lines);
        
        $return = [];
        foreach ($lines as $line) {
            $parts = explode(':', $line);
            $return[trim($parts[0])] = trim($parts[1]);
        }

        return $return;
    }
public function cpu_info ( $ parse = true ) { $ lines = trim ( shell_exec ( 'lscpu' ) ) ; if ( ! $ parse ) { return $ lines ; } if ( empty ( $ lines ) ) { return [ ] ; } $ lines = explode ( PHP_EOL , $ lines ) ; $ return = [ ] ; foreach ( $ lines as $ line ) { $ parts = explode ( ':' , $ line ) ; $ return [ trim ( $ parts [ 0 ] ) ] = trim ( $ parts [ 1 ] ) ; } return $ return ; }
Get system CPU info
Get system CPU info