How to use md5 in PHP

In this article I will explain how the explode() function can be used in PHP.
  • 1360

md5() function in PHP

  • The md5() function is used to calculates the MD5 hash of a string.
  • The md5() function uses the RSA Data Security.
  • The md5() algorithm is intended for digital signature applications.
  • The md5() function returns the calculated MD5 hash on success, or FALSE on failure.




  • string string is required parameter. It determine check to string.
  • raw raw is optional parameter. determine hex or binary output format:
    • TRUE - Raw 16 character binary format.
    • FALSE - it's the default value. 32 character hex number.


The following example show to how the md5() function can be used in PHP.



<h3 style="color: red;">md5() function example in PHP</h3>


    $str = "Csharpcorner";

    echo 'csharpcorner md5 code : <br/>'.md5($str);

    if (md5($str) == '7bb86eead48eb67a958903adb7e1e706')


    echo "<br />Welcome to C-sharpcorner..!";








You may also want to read these related articles here
Ask Your Question 
Got a programming related question? You may want to post your question here


More Articles

© 2020 DotNetHeaven. All rights reserved.