Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Extract a slice of the array
<?php array_slice(    array $array,    int $offset,    ?int $length = null,    bool $preserve_keys = false): array
<?php     public function filterReport(array $report): array

    {

        if (! $this->hasTab('stackTraceTab')) {

            $report['stacktrace'] = array_slice($report['stacktrace'], 0, 1);

        }



        if (! $this->hasTab('debugTab')) {
<?php         $this->logMessages[] = LogMessage::fromMessageLoggedEvent($event);



        if (is_int($this->maxLogs)) {

            $this->logMessages = array_slice($this->logMessages, -$this->maxLogs);

        }

    }
<?php         $this->queries[] = Query::fromQueryExecutedEvent($queryExecuted, $this->reportBindings);



        if (is_int($this->maxQueries)) {

            $this->queries = array_slice($this->queries, -$this->maxQueries);

        }

    }