symfony - nelmio/alice random string with specified long -


i trying find way generate random unique string 8 characters long using nelmio/alice.

and i've found <uuid()> (token (unique): <uuid()>)method, unfortunately returns long string, need 8 characters.

may 1 knows elegant solution?

thanks i've found solution

token (unique): '<( substr( md5( uniqid( rand(), true ) ) , 0, 8) )>' 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -