3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Note that the salt here is randomly generated. * Never use a static salt or one that is not randomly generated. * * For the VAST majority of use-cases, let password_hash generate the salt randomly for you */ $options = [ 'cost' => 11, 'salt' => mcrypt_create_iv(MCRYPT_CAST_256, MCRYPT_DEV_URANDOM), ]; echo password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mCjJD
function name:  (null)
number of ops:  17
compiled vars:  !0 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_ARRAY                                       ~1      11, 'cost'
   10     1        INIT_FCALL_BY_NAME                                       'mcrypt_create_iv'
          2        FETCH_CONSTANT                                   ~2      'MCRYPT_CAST_256'
          3        SEND_VAL_EX                                              ~2
          4        FETCH_CONSTANT                                   ~3      'MCRYPT_DEV_URANDOM'
          5        SEND_VAL_EX                                              ~3
          6        DO_FCALL                                      0  $4      
          7        ADD_ARRAY_ELEMENT                                ~1      $4, 'salt'
    8     8        ASSIGN                                                   !0, ~1
   12     9        INIT_FCALL                                               'password_hash'
         10        SEND_VAL                                                 'rasmuslerdorf'
         11        SEND_VAL                                                 '2y'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $6      
         14        CONCAT                                           ~7      $6, '%0A'
         15        ECHO                                                     ~7
   13    16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.89 ms | 1398 KiB | 15 Q