3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cipher = 'AES-256-CBC'; $cipher = 'AES-256-CFB8'; $mode = strtolower(substr($cipher, strrpos($cipher, '-') - strlen($cipher))); $ivSize = openssl_cipher_iv_length($cipher); $blockSize = $ivSize > 0 ? $ivSize : openssl_cipher_iv_length(str_ireplace('-' . $mode, '', $cipher)); var_dump($mode); var_dump($ivSize); var_dump($blockSize);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iX0DF
function name:  (null)
number of ops:  45
compiled vars:  !0 = $cipher, !1 = $mode, !2 = $ivSize, !3 = $blockSize
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'AES-256-CBC'
    4     1        ASSIGN                                                   !0, 'AES-256-CFB8'
    5     2        INIT_FCALL                                               'strtolower'
          3        INIT_FCALL                                               'substr'
          4        SEND_VAR                                                 !0
          5        INIT_FCALL                                               'strrpos'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 '-'
          8        DO_ICALL                                         $6      
          9        STRLEN                                           ~7      !0
         10        SUB                                              ~8      $6, ~7
         11        SEND_VAL                                                 ~8
         12        DO_ICALL                                         $9      
         13        SEND_VAR                                                 $9
         14        DO_ICALL                                         $10     
         15        ASSIGN                                                   !1, $10
    6    16        INIT_FCALL_BY_NAME                                       'openssl_cipher_iv_length'
         17        SEND_VAR_EX                                              !0
         18        DO_FCALL                                      0  $12     
         19        ASSIGN                                                   !2, $12
    7    20        IS_SMALLER                                               0, !2
         21      > JMPZ                                                     ~14, ->24
    8    22    >   QM_ASSIGN                                        ~15     !2
         23      > JMP                                                      ->34
    9    24    >   INIT_FCALL_BY_NAME                                       'openssl_cipher_iv_length'
         25        INIT_FCALL                                               'str_ireplace'
         26        CONCAT                                           ~16     '-', !1
         27        SEND_VAL                                                 ~16
         28        SEND_VAL                                                 ''
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $17     
         31        SEND_VAR_NO_REF_EX                                       $17
         32        DO_FCALL                                      0  $18     
         33        QM_ASSIGN                                        ~15     $18
    7    34    >   ASSIGN                                                   !3, ~15
   11    35        INIT_FCALL                                               'var_dump'
         36        SEND_VAR                                                 !1
         37        DO_ICALL                                                 
   12    38        INIT_FCALL                                               'var_dump'
         39        SEND_VAR                                                 !2
         40        DO_ICALL                                                 
   13    41        INIT_FCALL                                               'var_dump'
         42        SEND_VAR                                                 !3
         43        DO_ICALL                                                 
         44      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.29 ms | 1405 KiB | 23 Q