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"; $randomString = 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); $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"', $this->login, $digest, $nonce, $created);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GQPNP
function name:  (null)
number of ops:  39
compiled vars:  !0 = $created, !1 = $randomString, !2 = $private_key, !3 = $nonce, !4 = $key, !5 = $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                                         $6      
          3        ECHO                                                     $6
    5     4        ASSIGN                                                   !0, '2015-08-25T10%3A45%3A55Z'
    6     5        ASSIGN                                                   !1, <array>
    7     6        ASSIGN                                                   !2, 'aDknWCcwJEsuNjRpJS52ZnN4Ti1MRDk1M2cyNU5N'
    8     7        INIT_FCALL                                               'hash'
          8        SEND_VAL                                                 'sha512'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !3, $10
    9    12        INIT_FCALL                                               'base64_decode'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $12     
         15        ASSIGN                                                   !4, $12
   10    16        INIT_FCALL                                               'base64_encode'
         17        INIT_FCALL                                               'sha1'
         18        INIT_FCALL                                               'base64_decode'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $14     
         21        CONCAT                                           ~15     $14, !0
         22        CONCAT                                           ~16     ~15, !4
         23        SEND_VAL                                                 ~16
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $17     
         26        SEND_VAR                                                 $17
         27        DO_ICALL                                         $18     
         28        ASSIGN                                                   !5, $18
   11    29        INIT_FCALL                                               'sprintf'
         30        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'
         31        FETCH_THIS                                       $20     
         32        FETCH_OBJ_R                                      ~21     $20, 'login'
         33        SEND_VAL                                                 ~21
         34        SEND_VAR                                                 !5
         35        SEND_VAR                                                 !3
         36        SEND_VAR                                                 !0
         37        DO_ICALL                                                 
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.79 ms | 1396 KiB | 25 Q