3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo gmdate('Y-m-d\TH:i:s\Z'); $created = "2015-08-25T10:45:55Z"; $bytes = array(219,237,93,18,84,210,254,168,120,82,56,138,97,64,219,199,173,111,217,208,167,150,79,50,114,227,40,191,210,188,233,34); $randomString = vsprintf(str_repeat('%c', count($bytes)), $bytes); $private_key = 'aDknWCcwJEsuNjRpJS52ZnN4Ti1MRDk1M2cyNU5N'; $nonce = hash('sha512', $randomString); $key = base64_decode($private_key); $digest = base64_encode(sha1(base64_decode($nonce) . $created . $key, true)); sprintf('UsernameToken Username="%s", PasswordDigest="%s", Nonce="%s", Created="%s"', 'wkstore', $digest, $nonce, $created);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UNe8m
function name:  (null)
number of ops:  47
compiled vars:  !0 = $created, !1 = $bytes, !2 = $randomString, !3 = $private_key, !4 = $nonce, !5 = $key, !6 = $digest
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'gmdate'
          1        SEND_VAL                                                 'Y-m-d%5CTH%3Ai%3As%5CZ'
          2        DO_ICALL                                         $7      
          3        ECHO                                                     $7
    5     4        ASSIGN                                                   !0, '2015-08-25T10%3A45%3A55Z'
    6     5        ASSIGN                                                   !1, <array>
    7     6        INIT_FCALL                                               'vsprintf'
          7        INIT_FCALL                                               'str_repeat'
          8        SEND_VAL                                                 '%25c'
          9        COUNT                                            ~10     !1
         10        SEND_VAL                                                 ~10
         11        DO_ICALL                                         $11     
         12        SEND_VAR                                                 $11
         13        SEND_VAR                                                 !1
         14        DO_ICALL                                         $12     
         15        ASSIGN                                                   !2, $12
    8    16        ASSIGN                                                   !3, 'aDknWCcwJEsuNjRpJS52ZnN4Ti1MRDk1M2cyNU5N'
    9    17        INIT_FCALL                                               'hash'
         18        SEND_VAL                                                 'sha512'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $15     
         21        ASSIGN                                                   !4, $15
   10    22        INIT_FCALL                                               'base64_decode'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                         $17     
         25        ASSIGN                                                   !5, $17
   11    26        INIT_FCALL                                               'base64_encode'
         27        INIT_FCALL                                               'sha1'
         28        INIT_FCALL                                               'base64_decode'
         29        SEND_VAR                                                 !4
         30        DO_ICALL                                         $19     
         31        CONCAT                                           ~20     $19, !0
         32        CONCAT                                           ~21     ~20, !5
         33        SEND_VAL                                                 ~21
         34        SEND_VAL                                                 <true>
         35        DO_ICALL                                         $22     
         36        SEND_VAR                                                 $22
         37        DO_ICALL                                         $23     
         38        ASSIGN                                                   !6, $23
   12    39        INIT_FCALL                                               'sprintf'
         40        SEND_VAL                                                 'UsernameToken+Username%3D%22%25s%22%2C+PasswordDigest%3D%22%25s%22%2C+Nonce%3D%22%25s%22%2C+Created%3D%22%25s%22'
         41        SEND_VAL                                                 'wkstore'
         42        SEND_VAR                                                 !6
         43        SEND_VAR                                                 !4
         44        SEND_VAR                                                 !0
         45        DO_ICALL                                                 
         46      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.22 ms | 1400 KiB | 29 Q