- bin2hex: documentation ( source)
- implode: documentation ( source)
- random_bytes: documentation ( source)
<?php
echo implode('-', [
bin2hex(random_bytes(4)),
bin2hex(random_bytes(4)),
bin2hex(random_bytes(4)),
bin2hex(random_bytes(4))
]);