array_splice

Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Remove a portion of the array and replace it with something else
<?php array_splice(    array &$array,    int $offset,    ?int $length = null,    mixed $replacement = []): array
<?php     public static function findPackagesForClassName(string $className): array

    {

        $parts = explode('\\', $className);

        $queryParts = array_splice($parts, 0, 2);



        $url = 'https://packagist.org/search.json?q='.implode(' ', $queryParts);