3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function stypr_encrypt($str){ $strings = $str; $MyKey = rand(1,1024); unset($tmp); for ($i = 0; $i < strlen($strings); $i++) { ++$n; $cal = ($n * $n) ^ hexdec("3E"); $tmp = $tmp . substr("00000".dechex(decoct(ord(substr($strings, $i, 1)) ^ ($MyKey ^ hexdec('AFE43') ^ hexdec('399AA3') ^ ($cal)))), -6); } $tmp = strtoupper(strrev(substr("000".dechex($MyKey ^ hexdec('BFF') ^ hexdec('D77D')), -4).$tmp)); return $tmp; } echo stypr_encrypt("pwning_the_phpreverse!");
based on tVEtk
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 62) Position 1 = -2
filename:       /in/LhAoP
function name:  (null)
number of ops:  6
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NOP                                                      
  16     1        INIT_FCALL                                               'stypr_encrypt'
         2        SEND_VAL                                                 'pwning_the_phpreverse%21'
         3        DO_FCALL                                      0  $0      
         4        ECHO                                                     $0
         5      > RETURN                                                   1

Function stypr_encrypt:
Finding entry points
Branch analysis from position: 0
Jump found. (Code = 42) Position 1 = 50
Branch analysis from position: 50
Jump found. (Code = 44) Position 1 = 53, Position 2 = 10
Branch analysis from position: 53
Jump found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
Jump found. (Code = 44) Position 1 = 53, Position 2 = 10
Branch analysis from position: 53
Branch analysis from position: 10
filename:       /in/LhAoP
function name:  stypr_encrypt
number of ops:  79
compiled vars:  !0 = $str, !1 = $strings, !2 = $MyKey, !3 = $tmp, !4 = $i, !5 = $n, !6 = $cal
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   RECV                                             !0      
   4     1        ASSIGN                                                   !1, !0
   5     2        INIT_FCALL                                               'rand'
         3        SEND_VAL                                                 1
         4        SEND_VAL                                                 1024
         5        DO_ICALL                                         $8      
         6        ASSIGN                                                   !2, $8
   6     7        UNSET_VAR                                                !3
   7     8        ASSIGN                                                   !4, 0
         9      > JMP                                                      ->50
   9    10    >   PRE_INC                                                  !5
  10    11        MUL                                              ~12     !5, !5
        12        INIT_FCALL                                               'hexdec'
        13        SEND_VAL                                                 '3E'
        14        DO_ICALL                                         $13     
        15        BW_XOR                                           ~14     ~12, $13
        16        ASSIGN                                                   !6, ~14
  11    17        INIT_FCALL                                               'substr'
        18        INIT_FCALL                                               'dechex'
        19        INIT_FCALL                                               'decoct'
        20        INIT_FCALL                                               'ord'
        21        INIT_FCALL                                               'substr'
        22        SEND_VAR                                                 !1
        23        SEND_VAR                                                 !4
        24        SEND_VAL                                                 1
        25        DO_ICALL                                         $16     
        26        SEND_VAR                                                 $16
        27        DO_ICALL                                         $17     
        28        INIT_FCALL                                               'hexdec'
        29        SEND_VAL                                                 'AFE43'
        30        DO_ICALL                                         $18     
        31        BW_XOR                                           ~19     !2, $18
        32        INIT_FCALL                                               'hexdec'
        33        SEND_VAL                                                 '399AA3'
        34        DO_ICALL                                         $20     
        35        BW_XOR                                           ~21     ~19, $20
        36        BW_XOR                                           ~22     ~21, !6
        37        BW_XOR                                           ~23     $17, ~22
        38        SEND_VAL                                                 ~23
        39        DO_ICALL                                         $24     
        40        SEND_VAR                                                 $24
        41        DO_ICALL                                         $25     
        42        CONCAT                                           ~26     '00000', $25
        43        SEND_VAL                                                 ~26
        44        SEND_VAL                                                 -6
        45        DO_ICALL                                         $27     
        46        CONCAT                                           ~28     !3, $27
        47        ASSIGN                                                   !3, ~28
   7    48        POST_INC                                         ~30     !4
        49        FREE                                                     ~30
        50    >   STRLEN                                           ~31     !1
        51        IS_SMALLER                                       ~32     !4, ~31
        52      > JMPNZ                                                    ~32, ->10
  13    53    >   INIT_FCALL                                               'strtoupper'
        54        INIT_FCALL                                               'strrev'
        55        INIT_FCALL                                               'substr'
        56        INIT_FCALL                                               'dechex'
        57        INIT_FCALL                                               'hexdec'
        58        SEND_VAL                                                 'BFF'
        59        DO_ICALL                                         $33     
        60        BW_XOR                                           ~34     !2, $33
        61        INIT_FCALL                                               'hexdec'
        62        SEND_VAL                                                 'D77D'
        63        DO_ICALL                                         $35     
        64        BW_XOR                                           ~36     ~34, $35
        65        SEND_VAL                                                 ~36
        66        DO_ICALL                                         $37     
        67        CONCAT                                           ~38     '000', $37
        68        SEND_VAL                                                 ~38
        69        SEND_VAL                                                 -4
        70        DO_ICALL                                         $39     
        71        CONCAT                                           ~40     $39, !3
        72        SEND_VAL                                                 ~40
        73        DO_ICALL                                         $41     
        74        SEND_VAR                                                 $41
        75        DO_ICALL                                         $42     
        76        ASSIGN                                                   !3, $42
  14    77      > RETURN                                                   !3
  15    78*     > RETURN                                                   null

End of function stypr_encrypt

Generated using Vulcan Logic Dumper, using php 7.3.0