3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hash = '$2y$10$rAWi0P16ypjJs3c73bsukuOIYqwLMlwbcQd83fRDbQICFaFtlmJ7.'; $user = 'cliente1_user1'; $password = 'cliente1_user1'; function verifyPassword($user, $password, $hash){ $prepare_pass = md5($user.":pimcore:".$password); $ret = crypt($prepare_pass, $hash); echo $prepare_pass; echo "\r\n"; echo $ret; echo "\r\n"; echo $hash; echo "\r\n"; if (strcmp($hash, $ret) == 0){ return true; } else { return false; } } if (verifyPassword($user, $password, $hash)) { echo 'Password is valid!'; } else { echo 'Invalid password.'; } if (password_verify(md5('cliente1_user1:pimcore:cliente1_user1'), $hash)) { //echo 'Password is valid!'; } else { //echo 'Invalid password.'; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 21
Branch analysis from position: 20
Branch analysis from position: 21
filename:       /in/N9D5n
function name:  (null)
number of ops:  22
compiled vars:  !0 = $hash, !1 = $user, !2 = $password
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%242y%2410%24rAWi0P16ypjJs3c73bsukuOIYqwLMlwbcQd83fRDbQICFaFtlmJ7.'
    3     1        ASSIGN                                                   !1, 'cliente1_user1'
    4     2        ASSIGN                                                   !2, 'cliente1_user1'
   22     3        INIT_FCALL                                               'verifypassword'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !2
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0  $6      
          8      > JMPZ                                                     $6, ->11
   23     9    >   ECHO                                                     'Password+is+valid%21'
         10      > JMP                                                      ->12
   25    11    >   ECHO                                                     'Invalid+password.'
   28    12    >   INIT_FCALL                                               'password_verify'
         13        INIT_FCALL                                               'md5'
         14        SEND_VAL                                                 'cliente1_user1%3Apimcore%3Acliente1_user1'
         15        DO_ICALL                                         $7      
         16        SEND_VAR                                                 $7
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $8      
         19      > JMPZ                                                     $8, ->21
         20    > > JMP                                                      ->21
   33    21    > > RETURN                                                   1

Function verifypassword:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/N9D5n
function name:  verifyPassword
number of ops:  30
compiled vars:  !0 = $user, !1 = $password, !2 = $hash, !3 = $prepare_pass, !4 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    7     3        INIT_FCALL                                               'md5'
          4        CONCAT                                           ~5      !0, '%3Apimcore%3A'
          5        CONCAT                                           ~6      ~5, !1
          6        SEND_VAL                                                 ~6
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !3, $7
    8     9        INIT_FCALL                                               'crypt'
         10        SEND_VAR                                                 !3
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !4, $9
    9    14        ECHO                                                     !3
   10    15        ECHO                                                     '%0D%0A'
   11    16        ECHO                                                     !4
   12    17        ECHO                                                     '%0D%0A'
   13    18        ECHO                                                     !2
   14    19        ECHO                                                     '%0D%0A'
   15    20        INIT_FCALL                                               'strcmp'
         21        SEND_VAR                                                 !2
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                         $11     
         24        IS_EQUAL                                                 $11, 0
         25      > JMPZ                                                     ~12, ->28
   16    26    > > RETURN                                                   <true>
         27*       JMP                                                      ->29
   18    28    > > RETURN                                                   <false>
   20    29*     > RETURN                                                   null

End of function verifypassword

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.04 ms | 1403 KiB | 22 Q