3v4l.org

run code in 300+ PHP versions simultaneously
<?php function digestPassword($password, $salt = null) { static $cryptPrefix = '$2y$10$'; return [ substr(crypt($password, $cryptPrefix . $salt . '$'), 7), substr(crypt($password, $cryptPrefix . $salt), 7), ]; } var_dump(digestPassword('foobar', 'jSzEr3UNlNP8CT4tDRSjr'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VA1dS
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'digestpassword'
          2        SEND_VAL                                                 'foobar'
          3        SEND_VAL                                                 'jSzEr3UNlNP8CT4tDRSjr'
          4        DO_FCALL                                      0  $0      
          5        SEND_VAR                                                 $0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function digestpassword:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VA1dS
function name:  digestPassword
number of ops:  26
compiled vars:  !0 = $password, !1 = $salt, !2 = $cryptPrefix
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    4     2        BIND_STATIC                                              !2
    6     3        INIT_FCALL                                               'substr'
          4        INIT_FCALL                                               'crypt'
          5        SEND_VAR                                                 !0
          6        CONCAT                                           ~3      !2, !1
          7        CONCAT                                           ~4      ~3, '%24'
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                         $5      
         10        SEND_VAR                                                 $5
         11        SEND_VAL                                                 7
         12        DO_ICALL                                         $6      
         13        INIT_ARRAY                                       ~7      $6
    7    14        INIT_FCALL                                               'substr'
         15        INIT_FCALL                                               'crypt'
         16        SEND_VAR                                                 !0
         17        CONCAT                                           ~8      !2, !1
         18        SEND_VAL                                                 ~8
         19        DO_ICALL                                         $9      
         20        SEND_VAR                                                 $9
         21        SEND_VAL                                                 7
         22        DO_ICALL                                         $10     
         23        ADD_ARRAY_ELEMENT                                ~7      $10
         24      > RETURN                                                   ~7
    9    25*     > RETURN                                                   null

End of function digestpassword

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.42 ms | 1399 KiB | 20 Q