3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hash1 = hash('sha512', 'hello world'); $hash2 = hash('sha512', 'hello worldd'); similar_text($hash1, $hash2, $percent); if($percent == 100){ echo 'same'; echo $percent; } else { echo 'different'; echo $percent; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 20
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/P1kNW
function name:  (null)
number of ops:  23
compiled vars:  !0 = $hash1, !1 = $hash2, !2 = $percent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'hash'
          1        SEND_VAL                                                 'sha512'
          2        SEND_VAL                                                 'hello+world'
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !0, $3
    4     5        INIT_FCALL                                               'hash'
          6        SEND_VAL                                                 'sha512'
          7        SEND_VAL                                                 'hello+worldd'
          8        DO_ICALL                                         $5      
          9        ASSIGN                                                   !1, $5
    6    10        INIT_FCALL                                               'similar_text'
         11        SEND_VAR                                                 !0
         12        SEND_VAR                                                 !1
         13        SEND_REF                                                 !2
         14        DO_ICALL                                                 
    8    15        IS_EQUAL                                                 !2, 100
         16      > JMPZ                                                     ~8, ->20
    9    17    >   ECHO                                                     'same'
   10    18        ECHO                                                     !2
         19      > JMP                                                      ->22
   12    20    >   ECHO                                                     'different'
   13    21        ECHO                                                     !2
   14    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.02 ms | 1395 KiB | 17 Q