Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Split a string by a string
<?php explode(string $separator, string $string, int $limit = PHP_INT_MAX): 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);
<?php             return 1;

        }

        

        $map = explode("\n", $map);



        $line = $map[$exceptionLineNumber - 1] ?? $exceptionLineNumber;

        $pattern = '/\|---LINE:([0-9]+)---\|/m';
<?php     protected function insertLineNumberAtPosition(int $position, string $value)

    {

        $before = mb_substr($value, 0, $position);

        $lineNumber = count(explode("\n", $before));



        return mb_substr($value, 0, $position)."|---LINE:{$lineNumber}---|".mb_substr($value, $position);

    }