3v4l.org

run code in 300+ PHP versions simultaneously
<?php $password = 'test'; $salt = 'testtesttesttesttesttesttest'; $hash1 = crypt($password, '$2a$10$' . $salt); $hash2 = crypt($password, '$2y$10$' . $salt); printf("Hash 2a: %s\n", $hash1); printf("Hash 2y: %s\n", $hash2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/V9srM
function name:  (null)
number of ops:  23
compiled vars:  !0 = $password, !1 = $salt, !2 = $hash1, !3 = $hash2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test'
    3     1        ASSIGN                                                   !1, 'testtesttesttesttesttesttest'
    4     2        INIT_FCALL                                               'crypt'
          3        SEND_VAR                                                 !0
          4        CONCAT                                           ~6      '%242a%2410%24', !1
          5        SEND_VAL                                                 ~6
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !2, $7
    5     8        INIT_FCALL                                               'crypt'
          9        SEND_VAR                                                 !0
         10        CONCAT                                           ~9      '%242y%2410%24', !1
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                         $10     
         13        ASSIGN                                                   !3, $10
    6    14        INIT_FCALL                                               'printf'
         15        SEND_VAL                                                 'Hash+2a%3A+%25s%0A'
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                                 
    7    18        INIT_FCALL                                               'printf'
         19        SEND_VAL                                                 'Hash+2y%3A+%25s%0A'
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.66 ms | 1395 KiB | 17 Q