3v4l.org

run code in 300+ PHP versions simultaneously
<?php function insecureEncryptDoNotUse(string $plaintext, string $key): string { return \bin2hex( \openssl_encrypt( $plaintext, 'aes-128-ecb', $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING ) ); } $key = str_repeat("3.14", 4); var_dump(insecureEncryptDoNotUse('YELLOW SUBMARINE', $key)); var_dump(insecureEncryptDoNotUse('ORANGE SUBMARINE', $key)); var_dump(insecureEncryptDoNotUse('YELLOW SUBMARINE' . 'ORANGE SUBMARINE', $key));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t6TmH
function name:  (null)
number of ops:  27
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 '3.14'
          2        SEND_VAL                                                 4
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
   17     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'insecureencryptdonotuse'
          7        SEND_VAL                                                 'YELLOW+SUBMARINE'
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0  $3      
         10        SEND_VAR                                                 $3
         11        DO_ICALL                                                 
   18    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'insecureencryptdonotuse'
         14        SEND_VAL                                                 'ORANGE+SUBMARINE'
         15        SEND_VAR                                                 !0
         16        DO_FCALL                                      0  $5      
         17        SEND_VAR                                                 $5
         18        DO_ICALL                                                 
   19    19        INIT_FCALL                                               'var_dump'
         20        INIT_FCALL                                               'insecureencryptdonotuse'
         21        SEND_VAL                                                 'YELLOW+SUBMARINEORANGE+SUBMARINE'
         22        SEND_VAR                                                 !0
         23        DO_FCALL                                      0  $7      
         24        SEND_VAR                                                 $7
         25        DO_ICALL                                                 
         26      > RETURN                                                   1

Function insecureencryptdonotuse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t6TmH
function name:  insecureEncryptDoNotUse
number of ops:  18
compiled vars:  !0 = $plaintext, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        INIT_FCALL                                               'bin2hex'
    6     3        INIT_FCALL_BY_NAME                                       'openssl_encrypt'
    7     4        SEND_VAR_EX                                              !0
    8     5        SEND_VAL_EX                                              'aes-128-ecb'
    7     6        SEND_VAR_EX                                              !1
   10     7        FETCH_CONSTANT                                   ~2      'OPENSSL_RAW_DATA'
          8        FETCH_CONSTANT                                   ~3      'OPENSSL_ZERO_PADDING'
          9        BW_OR                                            ~4      ~2, ~3
         10        SEND_VAL_EX                                              ~4
    6    11        DO_FCALL                                      0  $5      
   10    12        SEND_VAR                                                 $5
    5    13        DO_ICALL                                         $6      
   10    14        VERIFY_RETURN_TYPE                                       $6
         15      > RETURN                                                   $6
   13    16*       VERIFY_RETURN_TYPE                                       
         17*     > RETURN                                                   null

End of function insecureencryptdonotuse

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.79 ms | 1453 KiB | 19 Q