3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pass='test'; $hash = crypt ($pass); echo $hash."\n"; if (password_needs_rehash($hash, PASSWORD_DEFAULT)){ $hash = password_hash($pass, PASSWORD_DEFAULT); } 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 = 17
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/5EYlc
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_needs_rehash'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 '2y'
         10        DO_ICALL                                         $6      
         11      > JMPZ                                                     $6, ->17
    6    12    >   INIT_FCALL                                               'password_hash'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 '2y'
         15        DO_ICALL                                         $7      
         16        ASSIGN                                                   !1, $7
    8    17    >   INIT_FCALL                                               'password_verify'
         18        SEND_VAR                                                 !0
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $9      
         21        CONCAT                                           ~10     $9, '%0A'
         22        ECHO                                                     ~10
    9    23        CONCAT                                           ~11     !1, '%0A'
         24        ECHO                                                     ~11
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.51 ms | 1395 KiB | 21 Q