3v4l.org

run code in 300+ PHP versions simultaneously
<?php use \Firebase\JWT\JWT; //function to generate JWT function generateJWT () { $key = 'key'; $secret = 'secret'; $token = array( "iss" => $key, // The benefit of JWT is expiry tokens, we'll set this one to expire in 1 minute "exp" => time() + 60 ); return JWT::encode($token, $secret); } echo generateJWT();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g2f77
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'generatejwt'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function generatejwt:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g2f77
function name:  generateJWT
number of ops:  14
compiled vars:  !0 = $key, !1 = $secret, !2 = $token
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 'key'
    8     1        ASSIGN                                                   !1, 'secret'
   10     2        INIT_ARRAY                                       ~5      !0, 'iss'
   12     3        INIT_FCALL                                               'time'
          4        DO_ICALL                                         $6      
          5        ADD                                              ~7      $6, 60
          6        ADD_ARRAY_ELEMENT                                ~5      ~7, 'exp'
    9     7        ASSIGN                                                   !2, ~5
   14     8        INIT_STATIC_METHOD_CALL                                  'Firebase%5CJWT%5CJWT', 'encode'
          9        SEND_VAR_EX                                              !2
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0  $9      
         12      > RETURN                                                   $9
   15    13*     > RETURN                                                   null

End of function generatejwt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.56 ms | 1401 KiB | 16 Q