str_split

Supported Versions: PHP 5, PHP 7, PHP 8
Convert a string to an array
<?php str_split(string $string, int $length = 1): array
<?php     public function path($key)

    {

        $parts = array_slice(str_split($hash = sha1($key), 2), 0, 2);



        return $this->directory.'/'.implode('/', $parts).'/'.$hash;

    }
<?php         $permissions = strtr($permissions, $map);




        $parts = str_split($permissions, 3);




        $mapper = function ($part) {
<?php         $mapper = function ($part) {

            return array_sum(str_split($part));

        };
<?php     {

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



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

    }



    private function authenticate(SFTP $connection): void
<?php     {

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



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

    }

}
<?php         $content = explode(' ', $publicKey, 3);

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



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

    }



    private function authenticate(SFTP $connection): void
<?php         $content = explode(' ', $publicKey, 3);

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



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

    }

}
<?php     {

        $safe = '';



        foreach (str_split($value) as $letter) {

            if (ord($letter) > 128) {

                return $letter;

            }
<?php     private static function convertAlphaVersionToIntVersion($alpha)

    {

        return strlen($alpha) * (-ord('a') + 1) + array_sum(array_map('ord', str_split($alpha)));

    }