3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = [ 'cost' => 10, // increase this value to increase iteration count and the time it takes to generate hashes. 'salt' => base64_encode('Laugh and spit into the air. There could be holy fallout!') // a secure SALT value will automatically be created ]; echo password_hash("coolespasswort!", PASSWORD_BCRYPT, $options); echo '\n$2a$10$TGF1Z2ggYW5kIHNwaXQgaObu.tI.AQbzlpBZZANmLiSWomw2S.Q0u'; var_dump(password_hash("coolespasswort!", PASSWORD_BCRYPT, $options) === '$2a$10$TGF1Z2ggYW5kIHNwaXQgaObu.tI.AQbzlpBZZANmLiSWomw2S.Q0u');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/smq44
function name:  (null)
number of ops:  23
compiled vars:  !0 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~1      10, 'cost'
    5     1        INIT_FCALL                                               'base64_encode'
          2        SEND_VAL                                                 'Laugh+and+spit+into+the+air.+There+could+be+holy+fallout%21'
          3        DO_ICALL                                         $2      
          4        ADD_ARRAY_ELEMENT                                ~1      $2, 'salt'
    3     5        ASSIGN                                                   !0, ~1
    8     6        INIT_FCALL                                               'password_hash'
          7        SEND_VAL                                                 'coolespasswort%21'
          8        SEND_VAL                                                 '2y'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $4      
         11        ECHO                                                     $4
    9    12        ECHO                                                     '%5Cn%242a%2410%24TGF1Z2ggYW5kIHNwaXQgaObu.tI.AQbzlpBZZANmLiSWomw2S.Q0u'
   10    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'password_hash'
         15        SEND_VAL                                                 'coolespasswort%21'
         16        SEND_VAL                                                 '2y'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $5      
         19        IS_IDENTICAL                                     ~6      $5, '%242a%2410%24TGF1Z2ggYW5kIHNwaXQgaObu.tI.AQbzlpBZZANmLiSWomw2S.Q0u'
         20        SEND_VAL                                                 ~6
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.48 ms | 1395 KiB | 19 Q