3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret = hex2bin('123456789ABCDEF0DEF1DEF2DEF3DEF4123456789ABCDEF0DEF1DEF2DEF3DEF4'); function encrypt128($str, $secret) { return mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $secret, base64_decode($str), MCRYPT_MODE_ECB); } function sslEncrypt128($str, $secret) { return base64_decode(openssl_encrypt($str, 'aes-256-ecb', $secret,OPENSSL_ZERO_PADDING)); } //var_dump(encrypt128('tc93Ex6l2GZIl8pEMLW13g==', $secret)); var_dump(sslEncrypt128(base64_encode('[03/20/18 13:28]'), $secret)); // lets assume you just called an openssl function that failed while ($msg = openssl_error_string()) echo $msg . "<br />\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 15
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 15
Branch analysis from position: 21
Branch analysis from position: 15
filename:       /in/CHjuT
function name:  (null)
number of ops:  22
compiled vars:  !0 = $secret, !1 = $msg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'hex2bin'
          1        SEND_VAL                                                 '123456789ABCDEF0DEF1DEF2DEF3DEF4123456789ABCDEF0DEF1DEF2DEF3DEF4'
          2        DO_ICALL                                         $2      
          3        ASSIGN                                                   !0, $2
   16     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'sslencrypt128'
          6        INIT_FCALL                                               'base64_encode'
          7        SEND_VAL                                                 '%5B03%2F20%2F18+13%3A28%5D'
          8        DO_ICALL                                         $4      
          9        SEND_VAR                                                 $4
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
   18    14      > JMP                                                      ->17
   19    15    >   CONCAT                                           ~7      !1, '%3Cbr+%2F%3E%0A'
         16        ECHO                                                     ~7
   18    17    >   INIT_FCALL_BY_NAME                                       'openssl_error_string'
         18        DO_FCALL                                      0  $8      
         19        ASSIGN                                           ~9      !1, $8
         20      > JMPNZ                                                    ~9, ->15
   19    21    > > RETURN                                                   1

Function encrypt128:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHjuT
function name:  encrypt128
number of ops:  15
compiled vars:  !0 = $str, !1 = $secret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        INIT_FCALL_BY_NAME                                       'mcrypt_decrypt'
          3        FETCH_CONSTANT                                   ~2      'MCRYPT_RIJNDAEL_256'
          4        SEND_VAL_EX                                              ~2
          5        SEND_VAR_EX                                              !1
          6        INIT_FCALL                                               'base64_decode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $3      
          9        SEND_VAR_NO_REF_EX                                       $3
         10        FETCH_CONSTANT                                   ~4      'MCRYPT_MODE_ECB'
         11        SEND_VAL_EX                                              ~4
         12        DO_FCALL                                      0  $5      
         13      > RETURN                                                   $5
    8    14*     > RETURN                                                   null

End of function encrypt128

Function sslencrypt128:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CHjuT
function name:  sslEncrypt128
number of ops:  14
compiled vars:  !0 = $str, !1 = $secret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        INIT_FCALL                                               'base64_decode'
          3        INIT_FCALL_BY_NAME                                       'openssl_encrypt'
          4        SEND_VAR_EX                                              !0
          5        SEND_VAL_EX                                              'aes-256-ecb'
          6        SEND_VAR_EX                                              !1
          7        FETCH_CONSTANT                                   ~2      'OPENSSL_ZERO_PADDING'
          8        SEND_VAL_EX                                              ~2
          9        DO_FCALL                                      0  $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                         $4      
         12      > RETURN                                                   $4
   13    13*     > RETURN                                                   null

End of function sslencrypt128

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
268.83 ms | 1016 KiB | 18 Q