<?php function get_next_colid(string $id): string { if ($id === '') { return "\0"; } $chrs = str_split($id); $bytes = array_map(fn(string $chr): int => ord($chr), $chrs); $last = array_pop($bytes); $last++; $bytes[] = $last; $reveresed = array_reverse($bytes); foreach($reveresed as $pos => $val) { if ($val > 255) { $reveresed[$pos] = 255; if (isset($reveresed[$pos+1])) { $reveresed[$pos+1] += ($val - 255); } else { $reveresed[$pos+1] = ($val - 255); } } } $bytes = array_reverse($reveresed); $chrs = array_map(fn(int $byte): string => chr($byte), $bytes); return join('', $chrs); } $s = '~'; for($i = 0; $i <= 1000; $i++) { print bin2hex($s) . PHP_EOL; $s = get_next_colid($s); } var_dump($s);
You have javascript disabled. You will not be able to edit any code.
This script was stopped while abusing our resources
Value for `_results` contains invalid data `array`