Skip to content

Commit 2509ee1

Browse files
committed
* genLogId新方案
1 parent 8390674 commit 2509ee1

1 file changed

Lines changed: 0 additions & 18 deletions

File tree

src/HttpServer.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -279,22 +279,4 @@ public function genLogId($request)
279279

280280
return $logId;
281281
}
282-
283-
284-
function generateIdHex()
285-
{
286-
static $i = 0;
287-
$i OR $i = mt_rand(1, 0x7FFFFF);
288-
289-
return sprintf("%08x%06x%04x%06x",
290-
time() & 0xFFFFFFFF,
291-
292-
crc32(substr((string)gethostname(), 0, 256)) >> 8 & 0xFFFFFF,
293-
294-
getmypid() & 0xFFFF,
295-
296-
$i = $i > 0xFFFFFE ? 1 : $i + 1
297-
);
298-
}
299-
300282
}

0 commit comments

Comments
 (0)