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             'file' => $fallbackTrace['file'] ?? $throwable->getFile(),

            'line' => $fallbackTrace['line'] ?? (int) $throwable->getLine(),

            'message' => $throwable->getMessage(),

            'trace' => array_slice($throwable->getTrace(), 0, 2),

        ])."\n");

    }
<?php             'file' => $throwable->getFile(),

            'line' => $throwable->getLine(),

            'message' => $throwable->getMessage(),

            'trace' => array_slice($throwable->getTrace(), 0, 2),

        ])."\n");

    }

}