3v4l.org

run code in 300+ PHP versions simultaneously
<?php $setting = '$2y$04$'; $salt = '1234567890123456789012'; // SAME SALT FOR ALL PASSWORDS, OMG, DON'T $str = '123456789012345678901234567890123456789012345678901234567890123456789012'; $passwd1 = $str . 'A'; $passwd2 = $str . 'E'; $hash1 = crypt($str, $setting . $salt . $passwd1); $hash2 = crypt($str, $setting . $salt . $passwd2); echo ($hash1 === $hash2 ? 'same' : 'unique');
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l6vDU
function name:  (null)
number of ops:  28
compiled vars:  !0 = $setting, !1 = $salt, !2 = $str, !3 = $passwd1, !4 = $passwd2, !5 = $hash1, !6 = $hash2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%242y%2404%24'
    3     1        ASSIGN                                                   !1, '1234567890123456789012'
    4     2        ASSIGN                                                   !2, '123456789012345678901234567890123456789012345678901234567890123456789012'
    6     3        CONCAT                                           ~10     !2, 'A'
          4        ASSIGN                                                   !3, ~10
    7     5        CONCAT                                           ~12     !2, 'E'
          6        ASSIGN                                                   !4, ~12
    8     7        INIT_FCALL                                               'crypt'
          8        SEND_VAR                                                 !2
          9        CONCAT                                           ~14     !0, !1
         10        CONCAT                                           ~15     ~14, !3
         11        SEND_VAL                                                 ~15
         12        DO_ICALL                                         $16     
         13        ASSIGN                                                   !5, $16
    9    14        INIT_FCALL                                               'crypt'
         15        SEND_VAR                                                 !2
         16        CONCAT                                           ~18     !0, !1
         17        CONCAT                                           ~19     ~18, !4
         18        SEND_VAL                                                 ~19
         19        DO_ICALL                                         $20     
         20        ASSIGN                                                   !6, $20
   11    21        IS_IDENTICAL                                             !5, !6
         22      > JMPZ                                                     ~22, ->25
         23    >   QM_ASSIGN                                        ~23     'same'
         24      > JMP                                                      ->26
         25    >   QM_ASSIGN                                        ~23     'unique'
         26    >   ECHO                                                     ~23
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.41 ms | 1388 KiB | 15 Q