Model/TopCommand.php
protected function parse($output)
    {
        $lines = explode(PHP_EOL, $output);
        $stats = array();
        foreach ($lines as $line) {
            $data = explode(' ', $line);
            array_walk($data, 'trim');
            $stats[] = array_values(array_filter($data, function ($value) {
                return strlen($value) > 0;
            }));
        }

        return $stats;
    }
protected function parse($output)
    {
        $lines = explode(PHP_EOL, $output);
        $stats = array();
        foreach ($lines as $line) {
            $data = explode(' ', $line);
            array_walk($data, 'trim');
            $stats[] = array_values(array_filter($data, function ($value) {
                return strlen($value) > 0;
            }));
        }

        return $stats;
    }
protected function parse ( $ output ) { $ lines = explode ( PHP_EOL , $ output ) ; $ stats = array ( ) ; foreach ( $ lines as $ line ) { $ data = explode ( ' ' , $ line ) ; array_walk ( $ data , 'trim' ) ; $ stats [ ] = array_values ( array_filter ( $ data , function ( $ value ) { return strlen ( $ value ) > 0 ; } ) ) ; } return $ stats ; }
Parse top utility command output

Returns an array of lines with the same top columns

@param $output
@return array
Parse top utility command output