- var_dump: documentation ( source)
- hex2bin: documentation ( source)
- str_replace: documentation ( source)
- base64_encode: documentation ( source)
<?php
$uuid = '550e8400-e29b-41d4-a716-446655440000';
$uuid = str_replace('-', '', $uuid);
$uuid = hex2bin($uuid);
$uuid = base64_encode($uuid);
$uuid = str_replace('=', '', $uuid);
var_dump($uuid);