3v4l.org

run code in 300+ PHP versions simultaneously
<?php function password_verify_with_rehash($password, $hash) { if (!password_verify($password, $hash)) { return false; } if (password_needs_rehash($hash, PASSWORD_DEFAULT)) { $hash = password_hash($password, PASSWORD_DEFAULT); return $hash; } } var_dump( password_verify_with_rehash() );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AlYsj
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'var_dump'
   15     1        INIT_FCALL                                               'password_verify_with_rehash'
          2        DO_FCALL                                      0  $0      
          3        SEND_VAR                                                 $0
          4        DO_ICALL                                                 
   16     5      > RETURN                                                   1

Function password_verify_with_rehash:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 20
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AlYsj
function name:  password_verify_with_rehash
number of ops:  21
compiled vars:  !0 = $password, !1 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    3     2        INIT_FCALL                                               'password_verify'
          3        SEND_VAR                                                 !0
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $2      
          6        BOOL_NOT                                         ~3      $2
          7      > JMPZ                                                     ~3, ->9
    4     8    > > RETURN                                                   <false>
    7     9    >   INIT_FCALL                                               'password_needs_rehash'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 '2y'
         12        DO_ICALL                                         $4      
         13      > JMPZ                                                     $4, ->20
    8    14    >   INIT_FCALL                                               'password_hash'
         15        SEND_VAR                                                 !0
         16        SEND_VAL                                                 '2y'
         17        DO_ICALL                                         $5      
         18        ASSIGN                                                   !1, $5
   10    19      > RETURN                                                   !1
   12    20    > > RETURN                                                   null

End of function password_verify_with_rehash

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.91 ms | 1399 KiB | 22 Q