3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pass='test'; $hash = crypt ($pass); echo $hash."\n"; if (password_verify($pass, $hash)){ if (password_needs_rehash($hash, PASSWORD_DEFAULT)){ $hash = password_hash($pass, PASSWORD_DEFAULT); } echo "good \n"; } //echo password_verify($pass, $hash)."\n"; echo $hash."\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 23
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 22
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
Branch analysis from position: 23
filename:       /in/2Xpat
function name:  (null)
number of ops:  26
compiled vars:  !0 = $pass, !1 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test'
    3     1        INIT_FCALL                                               'crypt'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    4     5        CONCAT                                           ~5      !1, '%0A'
          6        ECHO                                                     ~5
    5     7        INIT_FCALL                                               'password_verify'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11      > JMPZ                                                     $6, ->23
    6    12    >   INIT_FCALL                                               'password_needs_rehash'
         13        SEND_VAR                                                 !1
         14        SEND_VAL                                                 '2y'
         15        DO_ICALL                                         $7      
         16      > JMPZ                                                     $7, ->22
    7    17    >   INIT_FCALL                                               'password_hash'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 '2y'
         20        DO_ICALL                                         $8      
         21        ASSIGN                                                   !1, $8
    9    22    >   ECHO                                                     'good+%0A'
   12    23    >   CONCAT                                           ~10     !1, '%0A'
         24        ECHO                                                     ~10
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.01 ms | 1395 KiB | 21 Q