3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ 'cost' => 12, 'salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM), ]; $hash = password_hash('tes', PASSWORD_BCRYPT, $options); if (password_verify('tes', $hash)) { echo 'Password is valid!'; } else { echo 'Invalid password.'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CMCLV
function name:  (null)
number of ops:  23
compiled vars:  !0 = $options, !1 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~2      12, 'cost'
    5     1        INIT_FCALL_BY_NAME                                       'mcrypt_create_iv'
          2        SEND_VAL_EX                                              22
          3        FETCH_CONSTANT                                   ~3      'MCRYPT_DEV_URANDOM'
          4        SEND_VAL_EX                                              ~3
          5        DO_FCALL                                      0  $4      
          6        ADD_ARRAY_ELEMENT                                ~2      $4, 'salt'
    3     7        ASSIGN                                                   !0, ~2
    8     8        INIT_FCALL                                               'password_hash'
          9        SEND_VAL                                                 'tes'
         10        SEND_VAL                                                 '2y'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        ASSIGN                                                   !1, $6
   10    14        INIT_FCALL                                               'password_verify'
         15        SEND_VAL                                                 'tes'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $8      
         18      > JMPZ                                                     $8, ->21
   11    19    >   ECHO                                                     'Password+is+valid%21'
         20      > JMP                                                      ->22
   13    21    >   ECHO                                                     'Invalid+password.'
   14    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.06 ms | 1395 KiB | 17 Q