title: java functions equivalent in php
body: <p>I have a web service written in java and I have a java client example to call the web service as below:</p>
  
  <pre><code>private static String hash(String value) throws NoSuchAlgorithmException {
          byte[] data = value.getBytes(StandardCharsets.US_ASCII);
          MessageDigest md = MessageDigest.getInstance("MD5");
          byte[] result = md.digest(data);
          return Hex.encodeHexString(result).replace("-", "").toLowerCase();
  }
  </code></pre>
  
  <p>I want to develop client file in php but I do not know how to write these functions in php. What is this code snippet in php?</p>