3v4l.org

run code in 300+ PHP versions simultaneously
<?php $password = 'foobar'; $salt = 'qwertzuiopasdfghjklyxc'; $hash = password_hash($password, PASSWORD_BCRYPT, [ 'salt' => $salt, ]); $froxlor_pwd_salt = str_replace(substr(strrchr($hash, "$"), 1), "", $hash); $froxlor_pwd_check = crypt($password, $froxlor_pwd_salt); var_dump($hash, $froxlor_pwd_check);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Bub6H
function name:  (null)
number of ops:  33
compiled vars:  !0 = $password, !1 = $salt, !2 = $hash, !3 = $froxlor_pwd_salt, !4 = $froxlor_pwd_check
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foobar'
    4     1        ASSIGN                                                   !1, 'qwertzuiopasdfghjklyxc'
    6     2        INIT_FCALL                                               'password_hash'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 '2y'
    7     5        INIT_ARRAY                                       ~7      !1, 'salt'
          6        SEND_VAL                                                 ~7
    6     7        DO_ICALL                                         $8      
          8        ASSIGN                                                   !2, $8
   10     9        INIT_FCALL                                               'str_replace'
         10        INIT_FCALL                                               'substr'
         11        INIT_FCALL                                               'strrchr'
         12        SEND_VAR                                                 !2
         13        SEND_VAL                                                 '%24'
         14        DO_ICALL                                         $10     
         15        SEND_VAR                                                 $10
         16        SEND_VAL                                                 1
         17        DO_ICALL                                         $11     
         18        SEND_VAR                                                 $11
         19        SEND_VAL                                                 ''
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $12     
         22        ASSIGN                                                   !3, $12
   11    23        INIT_FCALL                                               'crypt'
         24        SEND_VAR                                                 !0
         25        SEND_VAR                                                 !3
         26        DO_ICALL                                         $14     
         27        ASSIGN                                                   !4, $14
   13    28        INIT_FCALL                                               'var_dump'
         29        SEND_VAR                                                 !2
         30        SEND_VAR                                                 !4
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.01 ms | 1017 KiB | 19 Q