- set_error_handler: documentation ( source)
- random_bytes: documentation ( source)
- str_contains: documentation ( source)
<?php
$i = 0;
set_error_handler(function($errno, $errstr) {
global $i;
if (str_contains($errstr, "multi")) {
echo "Error on round $i\n";
}
}, E_NOTICE);
while ($i < 10) {
$randomBytes = random_bytes(16);
$encoded = iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $randomBytes);
$i++;
}