- var_dump: documentation ( source)
- bin2hex: documentation ( source)
- json_decode: documentation ( source)
- json_encode: documentation ( source)
- random_bytes: documentation ( source)
<?php
$key = bin2hex(random_bytes(32));
$data = [
'b' => 1234,
'a' => 5678,
$key => 9
];
var_dump($data == json_decode(json_encode($data), true));