public static function generateRandomString($count, $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')
    {
        $characterCount = \Neos\Utility\Unicode\Functions::strlen($characters);
        $string = '';
        for ($i = 0; $i < $count; $i++) {
            $string .= \Neos\Utility\Unicode\Functions::substr($characters, random_int(0, ($characterCount - 1)), 1);
        }

        return $string;
    }
public static function generateRandomString($count, $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')
    {
        $characterCount = \Neos\Utility\Unicode\Functions::strlen($characters);
        $string = '';
        for ($i = 0; $i < $count; $i++) {
            $string .= \Neos\Utility\Unicode\Functions::substr($characters, random_int(0, ($characterCount - 1)), 1);
        }

        return $string;
    }
public static function generateRandomString ( $ count , $ characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' ) { $ characterCount = \ Neos \ Utility \ Unicode \ Functions :: strlen ( $ characters ) ; $ string = '' ; for ( $ i = 0 ; $ i < $ count ; $ i ++ ) { $ string .= \ Neos \ Utility \ Unicode \ Functions :: substr ( $ characters , random_int ( 0 , ( $ characterCount - 1 ) ) , 1 ) ; } return $ string ; }
Returns a random string with alpha-numeric characters.

@param integer $count Number of characters to generate
@param string $characters Allowed characters, defaults to alpha-numeric (a-zA-Z0-9)
@return string A random string
Returns a random string with alpha - numeric characters .