3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encrypt_decrypt($action, $string) { $output = false; $cipher = new Crypt_AES(CRYPT_AES_MODE_ECB); $cipher->setKey('8yh%@;%-_V!c*D;8*d-?.#WqF?#A;a/;@Xc._zS@;@p;F/Z!uG1;=X-Fb@/!g##m'); if( $action == 'encrypt' ) { $output = base64_encode($cipher->encrypt($string)); } else if( $action == 'decrypt' ){ $output = $cipher->decrypt(base64_decode($string)); } return $output; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Wv3kK
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   1

Function encrypt_decrypt:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 30
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/Wv3kK
function name:  encrypt_decrypt
number of ops:  32
compiled vars:  !0 = $action, !1 = $string, !2 = $output, !3 = $cipher
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ASSIGN                                                   !2, <false>
    6     3        NEW                                              $5      'Crypt_AES'
          4        FETCH_CONSTANT                                   ~6      'CRYPT_AES_MODE_ECB'
          5        SEND_VAL_EX                                              ~6
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !3, $5
    7     8        INIT_METHOD_CALL                                         !3, 'setKey'
          9        SEND_VAL_EX                                              '8yh%25%40%3B%25-_V%21c%2AD%3B8%2Ad-%3F.%23WqF%3F%23A%3Ba%2F%3B%40Xc._zS%40%3B%40p%3BF%2FZ%21uG1%3B%3DX-Fb%40%2F%21g%23%23m'
         10        DO_FCALL                                      0          
    9    11        IS_EQUAL                                                 !0, 'encrypt'
         12      > JMPZ                                                     ~10, ->21
   10    13    >   INIT_FCALL                                               'base64_encode'
         14        INIT_METHOD_CALL                                         !3, 'encrypt'
         15        SEND_VAR_EX                                              !1
         16        DO_FCALL                                      0  $11     
         17        SEND_VAR                                                 $11
         18        DO_ICALL                                         $12     
         19        ASSIGN                                                   !2, $12
         20      > JMP                                                      ->30
   12    21    >   IS_EQUAL                                                 !0, 'decrypt'
         22      > JMPZ                                                     ~14, ->30
   13    23    >   INIT_METHOD_CALL                                         !3, 'decrypt'
         24        INIT_FCALL                                               'base64_decode'
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $15     
         27        SEND_VAR_NO_REF_EX                                       $15
         28        DO_FCALL                                      0  $16     
         29        ASSIGN                                                   !2, $16
   16    30    > > RETURN                                                   !2
   17    31*     > RETURN                                                   null

End of function encrypt_decrypt

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.04 ms | 1396 KiB | 17 Q