3v4l.org

run code in 300+ PHP versions simultaneously
<?php $secret = 'a0a7e7997b6d5fcd55f4b5c32611b87c'; function encrypt128($str, $secret) { $block = 16; $pad = $block - (strlen($str) % $block); $str .= str_repeat(chr($pad), $pad); return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $secret, $str, MCRYPT_MODE_ECB)); } var_dump(encrypt128('small1', $secret));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/30ID9
function name:  (null)
number of ops:  9
compiled vars:  !0 = $secret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'a0a7e7997b6d5fcd55f4b5c32611b87c'
   14     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'encrypt128'
          3        SEND_VAL                                                 'small1'
          4        SEND_VAR                                                 !0
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function encrypt128:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/30ID9
function name:  encrypt128
number of ops:  28
compiled vars:  !0 = $str, !1 = $secret, !2 = $block, !3 = $pad
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2        ASSIGN                                                   !2, 16
    8     3        STRLEN                                           ~5      !0
          4        MOD                                              ~6      ~5, !2
          5        SUB                                              ~7      !2, ~6
          6        ASSIGN                                                   !3, ~7
    9     7        INIT_FCALL                                               'str_repeat'
          8        INIT_FCALL                                               'chr'
          9        SEND_VAR                                                 !3
         10        DO_ICALL                                         $9      
         11        SEND_VAR                                                 $9
         12        SEND_VAR                                                 !3
         13        DO_ICALL                                         $10     
         14        ASSIGN_OP                                     8          !0, $10
   11    15        INIT_FCALL                                               'base64_encode'
         16        INIT_FCALL_BY_NAME                                       'mcrypt_encrypt'
         17        FETCH_CONSTANT                                   ~12     'MCRYPT_RIJNDAEL_128'
         18        SEND_VAL_EX                                              ~12
         19        SEND_VAR_EX                                              !1
         20        SEND_VAR_EX                                              !0
         21        FETCH_CONSTANT                                   ~13     'MCRYPT_MODE_ECB'
         22        SEND_VAL_EX                                              ~13
         23        DO_FCALL                                      0  $14     
         24        SEND_VAR                                                 $14
         25        DO_ICALL                                         $15     
         26      > RETURN                                                   $15
   12    27*     > RETURN                                                   null

End of function encrypt128

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.86 ms | 1399 KiB | 22 Q