3v4l.org

run code in 300+ PHP versions simultaneously
<?php $message = "12345678901234560"; $key = "1234567890123456"; $iv = "12345678"; $cipher = mcrypt_encrypt(MCRYPT_BLOWFISH, $key, $message, MCRYPT_MODE_CBC, $iv); echo bin2hex($cipher) . "\n"; var_dump( openssl_decrypt( bin2hex($cipher), 'blowfish', $key, OPENSSL_RAW_DATA, $iv ), openssl_error_string() );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PWv2M
function name:  (null)
number of ops:  36
compiled vars:  !0 = $message, !1 = $key, !2 = $iv, !3 = $cipher
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '12345678901234560'
    4     1        ASSIGN                                                   !1, '1234567890123456'
    5     2        ASSIGN                                                   !2, '12345678'
    7     3        INIT_FCALL_BY_NAME                                       'mcrypt_encrypt'
          4        FETCH_CONSTANT                                   ~7      'MCRYPT_BLOWFISH'
          5        SEND_VAL_EX                                              ~7
          6        SEND_VAR_EX                                              !1
          7        SEND_VAR_EX                                              !0
          8        FETCH_CONSTANT                                   ~8      'MCRYPT_MODE_CBC'
          9        SEND_VAL_EX                                              ~8
         10        SEND_VAR_EX                                              !2
         11        DO_FCALL                                      0  $9      
         12        ASSIGN                                                   !3, $9
    8    13        INIT_FCALL                                               'bin2hex'
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $11     
         16        CONCAT                                           ~12     $11, '%0A'
         17        ECHO                                                     ~12
    9    18        INIT_FCALL                                               'var_dump'
   10    19        INIT_FCALL_BY_NAME                                       'openssl_decrypt'
   11    20        INIT_FCALL                                               'bin2hex'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $13     
         23        SEND_VAR_NO_REF_EX                                       $13
   12    24        SEND_VAL_EX                                              'blowfish'
   11    25        SEND_VAR_EX                                              !1
   14    26        FETCH_CONSTANT                                   ~14     'OPENSSL_RAW_DATA'
         27        SEND_VAL_EX                                              ~14
   11    28        SEND_VAR_EX                                              !2
         29        DO_FCALL                                      0  $15     
         30        SEND_VAR                                                 $15
   17    31        INIT_FCALL_BY_NAME                                       'openssl_error_string'
         32        DO_FCALL                                      0  $16     
         33        SEND_VAR                                                 $16
         34        DO_ICALL                                                 
   18    35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.67 ms | 1396 KiB | 17 Q