3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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));
based on uq1BY
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/t6TmH
function name:  (null)
number of ops:  28
compiled vars:  !0 = $key
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  15     1        INIT_FCALL                                               'str_repeat'
         2        SEND_VAL                                                 '3.14'
         3        SEND_VAL                                                 4
         4        DO_ICALL                                         $1      
         5        ASSIGN                                                   !0, $1
  17     6        INIT_FCALL                                               'var_dump'
         7        INIT_FCALL                                               'insecureencryptdonotuse'
         8        SEND_VAL                                                 'YELLOW+SUBMARINE'
         9        SEND_VAR                                                 !0
        10        DO_FCALL                                      0  $3      
        11        SEND_VAR                                                 $3
        12        DO_ICALL                                                 
  18    13        INIT_FCALL                                               'var_dump'
        14        INIT_FCALL                                               'insecureencryptdonotuse'
        15        SEND_VAL                                                 'ORANGE+SUBMARINE'
        16        SEND_VAR                                                 !0
        17        DO_FCALL                                      0  $5      
        18        SEND_VAR                                                 $5
        19        DO_ICALL                                                 
  19    20        INIT_FCALL                                               'var_dump'
        21        INIT_FCALL                                               'insecureencryptdonotuse'
        22        SEND_VAL                                                 'YELLOW+SUBMARINEORANGE+SUBMARINE'
        23        SEND_VAR                                                 !0
        24        DO_FCALL                                      0  $7      
        25        SEND_VAR                                                 $7
        26        DO_ICALL                                                 
        27      > RETURN                                                   1

Function insecureencryptdonotuse:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/t6TmH
function name:  insecureEncryptDoNotUse
number of ops:  15
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'
         3        INIT_FCALL                                               'openssl_encrypt'
         4        SEND_VAR                                                 !0
   8     5        SEND_VAL                                                 'aes-128-ecb'
         6        SEND_VAR                                                 !1
  10     7        SEND_VAL                                                 3
         8        DO_ICALL                                         $2      
         9        SEND_VAR                                                 $2
        10        DO_ICALL                                         $3      
        11        VERIFY_RETURN_TYPE                                       $3
        12      > RETURN                                                   $3
  13    13*       VERIFY_RETURN_TYPE                                       
        14*     > RETURN                                                   null

End of function insecureencryptdonotuse

Generated using Vulcan Logic Dumper, using php 7.1.0