3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mcrypt_create_iv($len) { $str = ''; for ($i = 0; $i < $len; $i++) { $str .= chr(mt_rand(0, 255)); } return $str; } $options = [ 'cost' => 11, 'salt' => mcrypt_create_iv(22), ]; echo password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/f70Wm
function name:  (null)
number of ops:  14
compiled vars:  !0 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_ARRAY                                       ~1      11, 'cost'
   12     1        INIT_FCALL                                               'mcrypt_create_iv'
          2        SEND_VAL                                                 22
          3        DO_FCALL                                      0  $2      
          4        ADD_ARRAY_ELEMENT                                ~1      $2, 'salt'
   10     5        ASSIGN                                                   !0, ~1
   14     6        INIT_FCALL                                               'password_hash'
          7        SEND_VAL                                                 'rasmuslerdorf'
          8        SEND_VAL                                                 '2y'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        CONCAT                                           ~5      $4, '%0A'
         12        ECHO                                                     ~5
         13      > RETURN                                                   1

Function mcrypt_create_iv:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
filename:       /in/f70Wm
function name:  mcrypt_create_iv
number of ops:  17
compiled vars:  !0 = $len, !1 = $str, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, ''
    4     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->13
    5     4    >   INIT_FCALL                                               'chr'
          5        INIT_FCALL                                               'mt_rand'
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 255
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                         $6      
         11        ASSIGN_OP                                     8          !1, $6
    4    12        PRE_INC                                                  !2
         13    >   IS_SMALLER                                               !2, !0
         14      > JMPNZ                                                    ~9, ->4
    7    15    > > RETURN                                                   !1
    8    16*     > RETURN                                                   null

End of function mcrypt_create_iv

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.91 ms | 1399 KiB | 20 Q