3v4l.org

run code in 300+ PHP versions simultaneously
<?php $realPassword = str_repeat('a', 80) . '3F$^$S#^%$JFD'; $hash = password_hash($realPassword, PASSWORD_BCRYPT); $attackerGuess = str_repeat('a', 80); echo 'real password ' . (password_verify($realPassword, $hash) ? 'accepted' : 'rejected') . PHP_EOL; echo "attacker's guess " . (password_verify($attackerGuess, $hash) ? 'accepted' : 'rejected') . PHP_EOL;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 21, Position 2 = 23
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
Branch analysis from position: 34
filename:       /in/KIAGX
function name:  (null)
number of ops:  39
compiled vars:  !0 = $realPassword, !1 = $hash, !2 = $attackerGuess
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 'a'
          2        SEND_VAL                                                 80
          3        DO_ICALL                                         $3      
          4        CONCAT                                           ~4      $3, '3F%24%5E%24S%23%5E%25%24JFD'
          5        ASSIGN                                                   !0, ~4
    5     6        INIT_FCALL                                               'password_hash'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 '2y'
          9        DO_ICALL                                         $6      
         10        ASSIGN                                                   !1, $6
    7    11        INIT_FCALL                                               'str_repeat'
         12        SEND_VAL                                                 'a'
         13        SEND_VAL                                                 80
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !2, $8
    9    16        INIT_FCALL                                               'password_verify'
         17        SEND_VAR                                                 !0
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $10     
         20      > JMPZ                                                     $10, ->23
         21    >   QM_ASSIGN                                        ~11     'accepted'
         22      > JMP                                                      ->24
         23    >   QM_ASSIGN                                        ~11     'rejected'
         24    >   CONCAT                                           ~12     'real+password+', ~11
         25        CONCAT                                           ~13     ~12, '%0A'
         26        ECHO                                                     ~13
   10    27        INIT_FCALL                                               'password_verify'
         28        SEND_VAR                                                 !2
         29        SEND_VAR                                                 !1
         30        DO_ICALL                                         $14     
         31      > JMPZ                                                     $14, ->34
         32    >   QM_ASSIGN                                        ~15     'accepted'
         33      > JMP                                                      ->35
         34    >   QM_ASSIGN                                        ~15     'rejected'
         35    >   CONCAT                                           ~16     'attacker%27s+guess+', ~15
         36        CONCAT                                           ~17     ~16, '%0A'
         37        ECHO                                                     ~17
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.94 ms | 1400 KiB | 19 Q