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 = 20, Position 2 = 22
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uB2bZ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $password, !1 = $salt, !2 = $hash, !3 = $result
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                                         $7      
          7        ASSIGN                                                   !3, $7
   10     8        INIT_FCALL                                               'printf'
          9        SEND_VAL                                                 'Length+hash+verify%3A+%25d%0A'
         10        STRLEN                                           ~9      !3
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                                 
   11    13        INIT_FCALL                                               'printf'
         14        SEND_VAL                                                 'Length+hash%3A+%25d%0A'
         15        STRLEN                                           ~11     !2
         16        SEND_VAL                                                 ~11
         17        DO_ICALL                                                 
   13    18        IS_IDENTICAL                                             !2, !3
         19      > JMPZ                                                     ~13, ->22
   14    20    >   ECHO                                                     'OK%21%0A'
         21      > JMP                                                      ->23
   16    22    >   ECHO                                                     'ERROR%0A'
   17    23    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.37 ms | 1395 KiB | 17 Q