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     private function normalizeWindowsObject(string $item, string $base): StorageAttributes

    {

        $item = preg_replace('#\s+#', ' ', trim($item), 3);

        $parts = explode(' ', $item, 4);



        if (count($parts) !== 4) {

            throw new InvalidListResponseReceived("Metadata can't be parsed from item '$item' , not enough parts.");
<?php     private function normalizeUnixObject(string $item, string $base): StorageAttributes

    {

        $item = preg_replace('#\s+#', ' ', trim($item), 7);

        $parts = explode(' ', $item, 9);



        if (count($parts) !== 9) {

            throw new InvalidListResponseReceived("Metadata can't be parsed from item '$item' , not enough parts.");
<?php             $seconds = '00';

        } else {

            $year = date('Y');

            [$hour, $minute] = explode(':', $timeOrYear);

            $seconds = '00';

        }
<?php         $connection = $this->connection();



        $dirPath = '';

        $parts = explode('/', rtrim($dirname, '/'));

        $mode = $visibility ? $this->visibilityConverter->forDirectory($visibility) : false;



        foreach ($parts as $part) {
<?php                 $dirname = dirname($subPath);



                if ($dirname !== '.') {

                    $parts = explode('/', $dirname);

                    $dirPath = '';



                    foreach ($parts as $index => $part) {
<?php         [$mountIdentifier, $mountPath] = explode('://', $path, 2);



        if ( ! array_key_exists($mountIdentifier, $this->filesystems)) {

            throw UnableToResolveFilesystemMount::becauseTheMountWasNotRegistered($mountIdentifier);
<?php     private function getFingerprintFromPublicKey(string $publicKey): string

    {

        $content = explode(' ', $publicKey, 3);



        return implode(':', str_split(md5(base64_decode($content[1])), 2));

    }
<?php     private function computeFingerPrint(string $publicKey): string

    {

        $content = explode(' ', $publicKey, 3);



        return implode(':', str_split(md5(base64_decode($content[1])), 2));

    }
<?php     private function getFingerprintFromPublicKey(string $publicKey): string

    {

        $content = explode(' ', $publicKey, 3);

        $algo = $content[0] === 'ssh-rsa' ? 'md5' : 'sha512';



        return implode(':', str_split(hash($algo, base64_decode($content[1])), 2));
<?php     private function computeFingerPrint(string $publicKey): string

    {

        $content = explode(' ', $publicKey, 3);

        $algo = $content[0] === 'ssh-rsa' ? 'md5' : 'sha512';



        return implode(':', str_split(hash($algo, base64_decode($content[1])), 2));
<?php     {

        $parts = [];



        foreach (explode('/', $path) as $part) {

            switch ($part) {

                case '':

                case '.':
<?php         $visibility = $config->get(Config::OPTION_DIRECTORY_VISIBILITY);

        $archive = $this->zipArchiveProvider->createZipArchive();

        $prefixedDirname = $this->pathPrefixer->prefixDirectoryPath($dirname);

        $parts = array_filter(explode('/', trim($prefixedDirname, '/')));

        $dirPath = '/';



        foreach ($parts as $part) {