- var_dump: documentation ( source)
- mb_strlen: documentation ( source)
- array_fill: documentation ( source)
- random_bytes: documentation ( source)
- gzcompress: documentation ( source)
<?php
$count = array_fill(0, 32, 0);
for ($i = 0; $i < 100000; ++$i) {
$key = random_bytes(32);
$comp = gzcompress($key);
$count[mb_strlen($comp, '8bit')]++;
}
var_dump($count);