3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = 'POST\n/auth/token\nproject=xRxyG0P5&ai=95335e7caf2f6a92&tm=1513574899'; $key = 'e68c202f73c54468b9822c843b320d34'; $signature = hash_hmac("sha256", $str, $key, false); function String2Hex($string){ $hex=''; for ($i=0; $i < strlen($string); $i++){ $hex .= dechex(ord($string[$i])); } return $hex; } echo $signature;exit; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/0WRtg
function name:  (null)
number of ops:  12
compiled vars:  !0 = $str, !1 = $key, !2 = $signature
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'POST%5Cn%2Fauth%2Ftoken%5Cnproject%3DxRxyG0P5%26ai%3D95335e7caf2f6a92%26tm%3D1513574899'
    4     1        ASSIGN                                                   !1, 'e68c202f73c54468b9822c843b320d34'
    5     2        INIT_FCALL                                               'hash_hmac'
          3        SEND_VAL                                                 'sha256'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        SEND_VAL                                                 <false>
          7        DO_ICALL                                         $5      
          8        ASSIGN                                                   !2, $5
   15     9        ECHO                                                     !2
         10      > EXIT                                                     
   17    11*     > RETURN                                                   1

Function string2hex:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 4
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 4
Branch analysis from position: 16
Branch analysis from position: 4
filename:       /in/0WRtg
function name:  String2Hex
number of ops:  18
compiled vars:  !0 = $string, !1 = $hex, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN                                                   !1, ''
    8     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->13
    9     4    >   INIT_FCALL                                               'dechex'
          5        INIT_FCALL                                               'ord'
          6        FETCH_DIM_R                                      ~5      !0, !2
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                         $7      
         11        ASSIGN_OP                                     8          !1, $7
    8    12        PRE_INC                                                  !2
         13    >   STRLEN                                           ~10     !0
         14        IS_SMALLER                                               !2, ~10
         15      > JMPNZ                                                    ~11, ->4
   12    16    > > RETURN                                                   !1
   13    17*     > RETURN                                                   null

End of function string2hex

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.83 ms | 1396 KiB | 19 Q