3v4l.org

run code in 300+ PHP versions simultaneously
<?php $username = 'test'; $password = '1234'; $hash = password_hash($password, PASSWORD_BCRYPT); echo "Hash: " . $hash . PHP_EOL; echo strlen($hash) . PHP_EOL; echo strlen(md5($password)) . PHP_EOL; if (password_verify($password, $hash)) { echo "Valid"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 24, Position 2 = 25
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/ClL4j
function name:  (null)
number of ops:  26
compiled vars:  !0 = $username, !1 = $password, !2 = $hash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'test'
    4     1        ASSIGN                                                   !1, '1234'
    6     2        INIT_FCALL                                               'password_hash'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 '2y'
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
    8     7        CONCAT                                           ~7      'Hash%3A+', !2
          8        CONCAT                                           ~8      ~7, '%0A'
          9        ECHO                                                     ~8
    9    10        STRLEN                                           ~9      !2
         11        CONCAT                                           ~10     ~9, '%0A'
         12        ECHO                                                     ~10
   11    13        INIT_FCALL                                               'md5'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $11     
         16        STRLEN                                           ~12     $11
         17        CONCAT                                           ~13     ~12, '%0A'
         18        ECHO                                                     ~13
   13    19        INIT_FCALL                                               'password_verify'
         20        SEND_VAR                                                 !1
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $14     
         23      > JMPZ                                                     $14, ->25
   14    24    >   ECHO                                                     'Valid'
   15    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.94 ms | 1395 KiB | 19 Q