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'; echo strlen($str); $passwd1 = $str . 'A'; $passwd2 = $str . 'B'; $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 = 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/vZ4qb
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        STRLEN                                           ~10     !2
          4        ECHO                                                     ~10
    7     5        CONCAT                                           ~11     !2, 'A'
          6        ASSIGN                                                   !3, ~11
    8     7        CONCAT                                           ~13     !2, 'B'
          8        ASSIGN                                                   !4, ~13
    9     9        INIT_FCALL                                               'crypt'
         10        SEND_VAR                                                 !3
         11        CONCAT                                           ~15     !0, !1
         12        SEND_VAL                                                 ~15
         13        DO_ICALL                                         $16     
         14        ASSIGN                                                   !5, $16
   10    15        INIT_FCALL                                               'crypt'
         16        SEND_VAR                                                 !4
         17        CONCAT                                           ~18     !0, !1
         18        SEND_VAL                                                 ~18
         19        DO_ICALL                                         $19     
         20        ASSIGN                                                   !6, $19
   12    21        IS_IDENTICAL                                             !5, !6
         22      > JMPZ                                                     ~21, ->25
         23    >   QM_ASSIGN                                        ~22     'same'
         24      > JMP                                                      ->26
         25    >   QM_ASSIGN                                        ~22     'unique'
         26    >   ECHO                                                     ~22
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.76 ms | 1396 KiB | 15 Q