3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cost = 10; $salt = strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.'); $salt = sprintf("$2a$%02d$", $cost) . $salt; $hash = crypt("thuum", $salt); echo $hash;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/U3Nv7
function name:  (null)
number of ops:  28
compiled vars:  !0 = $cost, !1 = $salt, !2 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10
          1        INIT_FCALL                                               'strtr'
          2        INIT_FCALL                                               'base64_encode'
          3        INIT_FCALL_BY_NAME                                       'mcrypt_create_iv'
          4        SEND_VAL_EX                                              16
          5        FETCH_CONSTANT                                   ~4      'MCRYPT_DEV_URANDOM'
          6        SEND_VAL_EX                                              ~4
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                         $6      
         10        SEND_VAR                                                 $6
         11        SEND_VAL                                                 '%2B'
         12        SEND_VAL                                                 '.'
         13        DO_ICALL                                         $7      
         14        ASSIGN                                                   !1, $7
         15        INIT_FCALL                                               'sprintf'
         16        SEND_VAL                                                 '%242a%24%2502d%24'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $9      
         19        CONCAT                                           ~10     $9, !1
         20        ASSIGN                                                   !1, ~10
         21        INIT_FCALL                                               'crypt'
         22        SEND_VAL                                                 'thuum'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $12     
         25        ASSIGN                                                   !2, $12
    5    26        ECHO                                                     !2
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.22 ms | 1395 KiB | 21 Q