3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.04 ms | 1395 KiB | 17 Q