3v4l.org

run code in 300+ PHP versions simultaneously
<?php $randomPassword = base64_encode(hash_hmac('sha256', 'example password', openssl_random_pseudo_bytes(32))); $hash = password_hash($randomPassword, PASSWORD_DEFAULT, ['cost' => 12]); var_dump([ $randomPassword, $hash ]); if (password_verify($randomPassword, $hash)) { var_dump(['status' => 'success']); } else { echo 'I can\'t let you do that, Dave!', "\n"; exit(1); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 32
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/GrsD6
function name:  (null)
number of ops:  36
compiled vars:  !0 = $randomPassword, !1 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'base64_encode'
          1        INIT_FCALL                                               'hash_hmac'
          2        SEND_VAL                                                 'sha256'
          3        SEND_VAL                                                 'example+password'
          4        INIT_FCALL_BY_NAME                                       'openssl_random_pseudo_bytes'
          5        SEND_VAL_EX                                              32
          6        DO_FCALL                                      0  $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        SEND_VAR                                                 $3
         10        DO_ICALL                                         $4      
         11        ASSIGN                                                   !0, $4
    5    12        INIT_FCALL                                               'password_hash'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 '2y'
         15        SEND_VAL                                                 <array>
         16        DO_ICALL                                         $6      
         17        ASSIGN                                                   !1, $6
    7    18        INIT_FCALL                                               'var_dump'
    8    19        INIT_ARRAY                                       ~8      !0
    9    20        ADD_ARRAY_ELEMENT                                ~8      !1
         21        SEND_VAL                                                 ~8
         22        DO_ICALL                                                 
   12    23        INIT_FCALL                                               'password_verify'
         24        SEND_VAR                                                 !0
         25        SEND_VAR                                                 !1
         26        DO_ICALL                                         $10     
         27      > JMPZ                                                     $10, ->32
   13    28    >   INIT_FCALL                                               'var_dump'
         29        SEND_VAL                                                 <array>
         30        DO_ICALL                                                 
         31      > JMP                                                      ->35
   15    32    >   ECHO                                                     'I+can%27t+let+you+do+that%2C+Dave%21'
         33        ECHO                                                     '%0A'
   16    34      > EXIT                                                     1
   17    35    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.45 ms | 1396 KiB | 23 Q