3v4l.org

run code in 300+ PHP versions simultaneously
<?php $password = 'mypassword'; $hash = password_hash($password, PASSWORD_DEFAULT); var_dump(password_get_info($hash)); echo "Password needs rehash? => "; echo (password_needs_rehash($hash, PASSWORD_DEFAULT)) ? 'yes':'no'; echo PHP_EOL; echo "Is password correct? => "; echo (password_verify($password, $hash)) ? 'yes':'no';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
Branch analysis from position: 31
filename:       /in/LT6Sh
function name:  (null)
number of ops:  34
compiled vars:  !0 = $password, !1 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'mypassword'
    4     1        INIT_FCALL                                               'password_hash'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 '2y'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    6     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'password_get_info'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
    8    12        ECHO                                                     'Password+needs+rehash%3F+%3D%3E+'
    9    13        INIT_FCALL                                               'password_needs_rehash'
         14        SEND_VAR                                                 !1
         15        SEND_VAL                                                 '2y'
         16        DO_ICALL                                         $7      
         17      > JMPZ                                                     $7, ->20
         18    >   QM_ASSIGN                                        ~8      'yes'
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~8      'no'
         21    >   ECHO                                                     ~8
   10    22        ECHO                                                     '%0A'
   11    23        ECHO                                                     'Is+password+correct%3F+%3D%3E+'
   12    24        INIT_FCALL                                               'password_verify'
         25        SEND_VAR                                                 !0
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $9      
         28      > JMPZ                                                     $9, ->31
         29    >   QM_ASSIGN                                        ~10     'yes'
         30      > JMP                                                      ->32
         31    >   QM_ASSIGN                                        ~10     'no'
         32    >   ECHO                                                     ~10
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.23 ms | 1396 KiB | 23 Q