random_bytes to generate cryptographically secure random bytes

echo random_bytes($length);
$length : Length of the random string returned as bytes.

Generates cryptographically secure pseudo-random bytes which can be used as Salts, keys etc.
Available in PHP 7


echo bin2hex($str);
Output ( Refresh this page to to see how the random number changes )

String Functions how to change all the letters to upper case nl2br() To add Line break
Subscribe to our YouTube Channel here


* indicates required
Subscribe to plus2net


    Post your comments , suggestion , error , requirements etc here

    PHP video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer