3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * var hash = System.Security.Cryptography.SHA256.Create(); * hash.ComputeHash(System.Text.Encoding.Unicode.GetBytes(secretKey + guid)); * aCookie.Values[""signatur""] = Convert.ToBase64String(hash.Hash); */ $guid = mb_convert_encoding('36a75830-be27-e111-a4dc-0050568b2fc3', 'UTF-8'); $secret = mb_convert_encoding('R3loadN3tcompanyIda', 'UTF-8'); $string = $secret . $guid; $hash = hash('sha256', $string, TRUE); $signature = base64_encode($hash); print $signature;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A9LiZ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $guid, !1 = $secret, !2 = $string, !3 = $hash, !4 = $signature
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'mb_convert_encoding'
          1        SEND_VAL                                                 '36a75830-be27-e111-a4dc-0050568b2fc3'
          2        SEND_VAL                                                 'UTF-8'
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !0, $5
   10     5        INIT_FCALL                                               'mb_convert_encoding'
          6        SEND_VAL                                                 'R3loadN3tcompanyIda'
          7        SEND_VAL                                                 'UTF-8'
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !1, $7
   12    10        CONCAT                                           ~9      !1, !0
         11        ASSIGN                                                   !2, ~9
   14    12        INIT_FCALL                                               'hash'
         13        SEND_VAL                                                 'sha256'
         14        SEND_VAR                                                 !2
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !3, $11
   15    18        INIT_FCALL                                               'base64_encode'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $13     
         21        ASSIGN                                                   !4, $13
   17    22        ECHO                                                     !4
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.38 ms | 1395 KiB | 19 Q