utf8_encode()
8.2.0 弃用此函数。
@Tinywan
private static function _sign(string $url, string $secret): string
{
[$s1, $s2] = explode(' ', microtime());
$timestamp = (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);
$data = $timestamp . "\n" . $secret;
$signStr = base64_encode(hash_hmac('sha256', $data, $secret, true));
$signStr = utf8_encode(urlencode($signStr));
return $url . "×tamp=$timestamp&sign=$signStr";
}
ErrorException: Function utf8_encode() is deprecated in
/*****/vendor/tinywan/exception-handler/src/Event/DingTalkRobotEvent.php:62
php8.2.4