ランキング参加中PHPランキング参加中プログラミングRRRRRRRR-RRRR-4RRR-rRRR-RRRRRRRRRRRRr のところが 8,9,a,b になってればヨシ <? function uuid4(): string { $hex = bin2hex(random_bytes(16)); // 32文字の16進文字列を作る $hex[12] = '4'; // 12文字目を 4 に $hex[16] = '89ab'[rand(0, 3)]; // 16文字目を 8,9,a,b のどれかに // いい感じに整形して返す return vsprintf('%s%s-%s-%s-%s-…