3v4l.org

run code in 300+ PHP versions simultaneously
<?php $password = 'test'; $salt = 'testtesttesttesttesttesttest'; // pre-calculated hash using PHP 5.4 and the new flag $2y$ $hash = '$2y$10$testtesttesttesttesttetsVhdqssnPoru2WOCEBbSFwYnOfjwmG'; $result = crypt($password, $hash); printf("Length hash verify: %d\n", strlen($result)); printf("Length hash: $d\n", strlen($hash)); if ($hash === $result) { echo "OK!\n"; } else { echo "ERROR\n"; }
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/rdmha
function name:  (null)
number of ops:  27
compiled vars:  !0 = $password, !1 = $salt, !2 = $hash, !3 = $result, !4 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'test'
    3     1        ASSIGN                                                   !1, 'testtesttesttesttesttesttest'
    6     2        ASSIGN                                                   !2, '%242y%2410%24testtesttesttesttesttetsVhdqssnPoru2WOCEBbSFwYnOfjwmG'
    8     3        INIT_FCALL                                               'crypt'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !2
          6        DO_ICALL                                         $8      
          7        ASSIGN                                                   !3, $8
   10     8        INIT_FCALL                                               'printf'
          9        SEND_VAL                                                 'Length+hash+verify%3A+%25d%0A'
         10        STRLEN                                           ~10     !3
         11        SEND_VAL                                                 ~10
         12        DO_ICALL                                                 
   11    13        INIT_FCALL                                               'printf'
         14        ROPE_INIT                                     3  ~13     'Length+hash%3A+'
         15        ROPE_ADD                                      1  ~13     ~13, !4
         16        ROPE_END                                      2  ~12     ~13, '%0A'
         17        SEND_VAL                                                 ~12
         18        STRLEN                                           ~15     !2
         19        SEND_VAL                                                 ~15
         20        DO_ICALL                                                 
   13    21        IS_IDENTICAL                                             !2, !3
         22      > JMPZ                                                     ~17, ->25
   14    23    >   ECHO                                                     'OK%21%0A'
         24      > JMP                                                      ->26
   16    25    >   ECHO                                                     'ERROR%0A'
   17    26    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.23 ms | 1395 KiB | 17 Q