3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ 'cost' => 7, 'salt' => 'BCryptRequires22Chrcts', ]; $hash['hash'][] = password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options); //"$2y$07$BCryptRequires22Chrcte/VlQH0piJtjXl.0t1XkA8pw9dMXTpOq" $hash['hash'][] = password_hash("rasmuslerdorf", PASSWORD_DEFAULT); //"$2y$10$hHi0De9WN.HL6.Fz1ElvbOMIU5NA0tetwdJzNziKJvHFXFqOxsybi" $hash['info'][] = password_get_info($hash['hash'][0]); //array("algo" => 1 , "algoName" => "bcrypt" , "options" => array("cost" => 7 )) $hash['info'][] = password_get_info($hash['hash'][1]); //array("algo" => 1 , "algoName" => "bcrypt" , "options" => array("cost" => 10 )) $hash['rehash'][] = password_needs_rehash($hash['hash'][0],PASSWORD_BCRYPT,$options); //false $hash['rehash'][] = password_needs_rehash($hash['hash'][0],PASSWORD_DEFAULT); //true $hash['rehash'][] = password_needs_rehash($hash['hash'][1],PASSWORD_DEFAULT); //false $hash['pas_verify'][] = password_verify('rasmuslerdorf', $hash['hash'][0]); //true $hash['pas_verify'][] = password_verify('rasmuslerdorf', $hash['hash'][1]); //true $hash['pas_verify'][] = password_verify('rasmuslerdorff', $hash['hash'][0]); //false $hash['pas_verify'][] = password_verify('rasmuslerdorff', $hash['hash'][1]); //false var_export($hash, false);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/c8CVM
function name:  (null)
number of ops:  101
compiled vars:  !0 = $options, !1 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'password_hash'
          2        SEND_VAL                                                 'rasmuslerdorf'
          3        SEND_VAL                                                 '2y'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $5      
          6        FETCH_DIM_W                                      $3      !1, 'hash'
          7        ASSIGN_DIM                                               $3
          8        OP_DATA                                                  $5
    9     9        INIT_FCALL                                               'password_hash'
         10        SEND_VAL                                                 'rasmuslerdorf'
         11        SEND_VAL                                                 '2y'
         12        DO_ICALL                                         $8      
         13        FETCH_DIM_W                                      $6      !1, 'hash'
         14        ASSIGN_DIM                                               $6
         15        OP_DATA                                                  $8
   11    16        INIT_FCALL                                               'password_get_info'
         17        FETCH_DIM_R                                      ~11     !1, 'hash'
         18        FETCH_DIM_R                                      ~12     ~11, 0
         19        SEND_VAL                                                 ~12
         20        DO_ICALL                                         $13     
         21        FETCH_DIM_W                                      $9      !1, 'info'
         22        ASSIGN_DIM                                               $9
         23        OP_DATA                                                  $13
   12    24        INIT_FCALL                                               'password_get_info'
         25        FETCH_DIM_R                                      ~16     !1, 'hash'
         26        FETCH_DIM_R                                      ~17     ~16, 1
         27        SEND_VAL                                                 ~17
         28        DO_ICALL                                         $18     
         29        FETCH_DIM_W                                      $14     !1, 'info'
         30        ASSIGN_DIM                                               $14
         31        OP_DATA                                                  $18
   14    32        INIT_FCALL                                               'password_needs_rehash'
         33        FETCH_DIM_R                                      ~21     !1, 'hash'
         34        FETCH_DIM_R                                      ~22     ~21, 0
         35        SEND_VAL                                                 ~22
         36        SEND_VAL                                                 '2y'
         37        SEND_VAR                                                 !0
         38        DO_ICALL                                         $23     
         39        FETCH_DIM_W                                      $19     !1, 'rehash'
         40        ASSIGN_DIM                                               $19
         41        OP_DATA                                                  $23
   15    42        INIT_FCALL                                               'password_needs_rehash'
         43        FETCH_DIM_R                                      ~26     !1, 'hash'
         44        FETCH_DIM_R                                      ~27     ~26, 0
         45        SEND_VAL                                                 ~27
         46        SEND_VAL                                                 '2y'
         47        DO_ICALL                                         $28     
         48        FETCH_DIM_W                                      $24     !1, 'rehash'
         49        ASSIGN_DIM                                               $24
         50        OP_DATA                                                  $28
   16    51        INIT_FCALL                                               'password_needs_rehash'
         52        FETCH_DIM_R                                      ~31     !1, 'hash'
         53        FETCH_DIM_R                                      ~32     ~31, 1
         54        SEND_VAL                                                 ~32
         55        SEND_VAL                                                 '2y'
         56        DO_ICALL                                         $33     
         57        FETCH_DIM_W                                      $29     !1, 'rehash'
         58        ASSIGN_DIM                                               $29
         59        OP_DATA                                                  $33
   18    60        INIT_FCALL                                               'password_verify'
         61        SEND_VAL                                                 'rasmuslerdorf'
         62        FETCH_DIM_R                                      ~36     !1, 'hash'
         63        FETCH_DIM_R                                      ~37     ~36, 0
         64        SEND_VAL                                                 ~37
         65        DO_ICALL                                         $38     
         66        FETCH_DIM_W                                      $34     !1, 'pas_verify'
         67        ASSIGN_DIM                                               $34
         68        OP_DATA                                                  $38
   19    69        INIT_FCALL                                               'password_verify'
         70        SEND_VAL                                                 'rasmuslerdorf'
         71        FETCH_DIM_R                                      ~41     !1, 'hash'
         72        FETCH_DIM_R                                      ~42     ~41, 1
         73        SEND_VAL                                                 ~42
         74        DO_ICALL                                         $43     
         75        FETCH_DIM_W                                      $39     !1, 'pas_verify'
         76        ASSIGN_DIM                                               $39
         77        OP_DATA                                                  $43
   20    78        INIT_FCALL                                               'password_verify'
         79        SEND_VAL                                                 'rasmuslerdorff'
         80        FETCH_DIM_R                                      ~46     !1, 'hash'
         81        FETCH_DIM_R                                      ~47     ~46, 0
         82        SEND_VAL                                                 ~47
         83        DO_ICALL                                         $48     
         84        FETCH_DIM_W                                      $44     !1, 'pas_verify'
         85        ASSIGN_DIM                                               $44
         86        OP_DATA                                                  $48
   21    87        INIT_FCALL                                               'password_verify'
         88        SEND_VAL                                                 'rasmuslerdorff'
         89        FETCH_DIM_R                                      ~51     !1, 'hash'
         90        FETCH_DIM_R                                      ~52     ~51, 1
         91        SEND_VAL                                                 ~52
         92        DO_ICALL                                         $53     
         93        FETCH_DIM_W                                      $49     !1, 'pas_verify'
         94        ASSIGN_DIM                                               $49
         95        OP_DATA                                                  $53
   23    96        INIT_FCALL                                               'var_export'
         97        SEND_VAR                                                 !1
         98        SEND_VAL                                                 <false>
         99        DO_ICALL                                                 
        100      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.13 ms | 1396 KiB | 23 Q