3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dangerous_pwd = 'foo' . chr(0) . 'bar'; $wrong_login_1 = 'baz'; $wrong_login_2 = 'foo'; $hash = password_hash($dangerous_pwd, PASSWORD_DEFAULT); if (password_verify($dangerous_pwd, $hash)) echo "this is good!\n"; if (password_verify($wrong_login_1, $hash)) echo "this shouldn't happen! (1)\n"; if (password_verify($wrong_login_2, $hash)) echo "this shouldn't happen, but does! (2)\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
Branch analysis from position: 20
Branch analysis from position: 14
filename:       /in/3G9Sg
function name:  (null)
number of ops:  27
compiled vars:  !0 = $dangerous_pwd, !1 = $wrong_login_1, !2 = $wrong_login_2, !3 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'foo%00bar'
    4     1        ASSIGN                                                   !1, 'baz'
    5     2        ASSIGN                                                   !2, 'foo'
    7     3        INIT_FCALL                                               'password_hash'
          4        SEND_VAR                                                 !0
          5        SEND_VAL                                                 '2y'
          6        DO_ICALL                                         $7      
          7        ASSIGN                                                   !3, $7
    9     8        INIT_FCALL                                               'password_verify'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !3
         11        DO_ICALL                                         $9      
         12      > JMPZ                                                     $9, ->14
   10    13    >   ECHO                                                     'this+is+good%21%0A'
   12    14    >   INIT_FCALL                                               'password_verify'
         15        SEND_VAR                                                 !1
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $10     
         18      > JMPZ                                                     $10, ->20
   13    19    >   ECHO                                                     'this+shouldn%27t+happen%21+%281%29%0A'
   15    20    >   INIT_FCALL                                               'password_verify'
         21        SEND_VAR                                                 !2
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                         $11     
         24      > JMPZ                                                     $11, ->26
   16    25    >   ECHO                                                     'this+shouldn%27t+happen%2C+but+does%21+%282%29%0A'
         26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
139.58 ms | 1447 KiB | 15 Q