create a sha3_256 hash from a string in php

To create a SHA3-256 hash from a string in PHP, you can use the hash function with the sha3-256 algorithm. Here's an example:

main.php
$string = 'Hello World';
$hash = hash('sha3-256', $string);
echo $hash;
72 chars
4 lines

This will output:

main.php
5dd56bb353c2a397baf210158d684f4eac4c53f36ecb5f4029270d9bf43b7f11
65 chars
2 lines

gistlibby LogSnag