3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = ''; $hashes = array(); $options = array( 'cost' => 4, 'salt' => '1234567890123456789012', ); do { $str .= '0'; $hashes[] = password_hash($str, PASSWORD_BCRYPT, $options); if (count(array_unique($hashes)) === count($hashes)) $allUnique = true; else $allUnique = false; } while($allUnique); echo "Stopped at " . strlen($str) . " characters before truncation was detected...\n\n"; $lst = array_pop($hashes); $stl = array_pop($hashes); echo "$stl\n$lst";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 3
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 3
Branch analysis from position: 22
Branch analysis from position: 3
filename:       /in/GbOo4
function name:  (null)
number of ops:  39
compiled vars:  !0 = $str, !1 = $hashes, !2 = $options, !3 = $allUnique, !4 = $lst, !5 = $stl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, ''
    3     1        ASSIGN                                                   !1, <array>
    5     2        ASSIGN                                                   !2, <array>
   11     3    >   ASSIGN_OP                                     8          !0, '0'
   12     4        INIT_FCALL                                               'password_hash'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 '2y'
          7        SEND_VAR                                                 !2
          8        DO_ICALL                                         $11     
          9        ASSIGN_DIM                                               !1
         10        OP_DATA                                                  $11
   13    11        INIT_FCALL                                               'array_unique'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $12     
         14        COUNT                                            ~13     $12
         15        COUNT                                            ~14     !1
         16        IS_IDENTICAL                                             ~13, ~14
         17      > JMPZ                                                     ~15, ->20
   14    18    >   ASSIGN                                                   !3, <true>
         19      > JMP                                                      ->21
   16    20    >   ASSIGN                                                   !3, <false>
   17    21    > > JMPNZ                                                    !3, ->3
   19    22    >   STRLEN                                           ~18     !0
         23        CONCAT                                           ~19     'Stopped+at+', ~18
         24        CONCAT                                           ~20     ~19, '+characters+before+truncation+was+detected...%0A%0A'
         25        ECHO                                                     ~20
   20    26        INIT_FCALL                                               'array_pop'
         27        SEND_REF                                                 !1
         28        DO_ICALL                                         $21     
         29        ASSIGN                                                   !4, $21
   21    30        INIT_FCALL                                               'array_pop'
         31        SEND_REF                                                 !1
         32        DO_ICALL                                         $23     
         33        ASSIGN                                                   !5, $23
   22    34        ROPE_INIT                                     3  ~26     !5
         35        ROPE_ADD                                      1  ~26     ~26, '%0A'
         36        ROPE_END                                      2  ~25     ~26, !4
         37        ECHO                                                     ~25
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.29 ms | 1404 KiB | 19 Q