3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ 'cost' => 12, 'salt' => md5('tes'), ]; $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 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W6ZJZ
function name:  (null)
number of ops:  21
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                                               'md5'
          2        SEND_VAL                                                 'tes'
          3        DO_ICALL                                         $3      
          4        ADD_ARRAY_ELEMENT                                ~2      $3, 'salt'
    3     5        ASSIGN                                                   !0, ~2
    8     6        INIT_FCALL                                               'password_hash'
          7        SEND_VAL                                                 'tes'
          8        SEND_VAL                                                 '2y'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $5      
         11        ASSIGN                                                   !1, $5
   10    12        INIT_FCALL                                               'password_verify'
         13        SEND_VAL                                                 'tes'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $7      
         16      > JMPZ                                                     $7, ->19
   11    17    >   ECHO                                                     'Password+is+valid%21'
         18      > JMP                                                      ->20
   13    19    >   ECHO                                                     'Invalid+password.'
   14    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.3 ms | 1395 KiB | 19 Q