Req #80382 [Spm->ReO]: Hidden because of SPAM

From: Date: Thu, 19 Nov 2020 15:50:47 +0000
Subject: Req #80382 [Spm->ReO]: Hidden because of SPAM
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230460@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80382&edit=1

 ID:                 80382
 Updated by:         cmb@php.net
 Reported by:        982144218 at qq dot com
-Summary:            返回值问题
+Summary:            Hidden because of SPAM
-Status:             Spam
+Status:             Re-Opened
 Type:               Feature/Change Request
 Package:            *Programming Data Structures
 Operating System:   Win 10
 PHP Version:        7.2.34
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2020-11-19 10:37:57] cmb@php.net

Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.

If it is about the : object return type: yes, this is only
available as of PHP 7.2.0:
<https://www.php.net/manual/en/migration72.new-features.php#migration72.new-features.object-type>

------------------------------------------------------------------------
[2020-11-19 10:21:18] 982144218 at qq dot com

Description:
------------
public static function decodeIdentityToken(string $identityToken) : object {
        $publicKeyKid = JWT::getPublicKeyKid($identityToken);

        $publicKeyData = self::fetchPublicKey($publicKeyKid);

        $publicKey = $publicKeyData['publicKey'];
        $alg = $publicKeyData['alg'];

        $payload = JWT::decode($identityToken, $publicKey, [$alg]);

        return $payload;
    }

Test script:
---------------
在7.1.9版本中return无法返回object(stdClass)类型,在7.3.9版本中可以使用



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80382&edit=1


Thread (5 messages)

« previous php.bugs (#230460) next »