3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AttackStream { function stream_open($path, $mode, $options, &$opened_path) { return true; } function stream_read($count) { echo $count,"\n"; return "AA"; } function stream_eof() { return true; } function stream_set_option() { return true; } function stream_seek($offset, $whence) { return false; } } stream_wrapper_register("attack", "AttackStream") or die("Failed to register protocol"); $f = fopen("attack://nothing", "r"); fread($f, 1); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R1CoA
function name:  (null)
number of ops:  17
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   INIT_FCALL                                               'stream_wrapper_register'
          1        SEND_VAL                                                 'attack'
          2        SEND_VAL                                                 'AttackStream'
          3        DO_ICALL                                         $1      
          4      > JMPNZ_EX                                         ~2      $1, ->7
          5    > > EXIT                                                     'Failed+to+register+protocol'
          6*       BOOL                                             ~2      <true>
   34     7    >   INIT_FCALL                                               'fopen'
          8        SEND_VAL                                                 'attack%3A%2F%2Fnothing'
          9        SEND_VAL                                                 'r'
         10        DO_ICALL                                         $3      
         11        ASSIGN                                                   !0, $3
   35    12        INIT_FCALL                                               'fread'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 1
         15        DO_ICALL                                                 
   36    16      > RETURN                                                   1

Class AttackStream:
Function stream_open:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R1CoA
function name:  stream_open
number of ops:  6
compiled vars:  !0 = $path, !1 = $mode, !2 = $options, !3 = $opened_path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    7     4      > RETURN                                                   <true>
    8     5*     > RETURN                                                   null

End of function stream_open

Function stream_read:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R1CoA
function name:  stream_read
number of ops:  5
compiled vars:  !0 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        ECHO                                                     !0
          2        ECHO                                                     '%0A'
   13     3      > RETURN                                                   'AA'
   14     4*     > RETURN                                                   null

End of function stream_read

Function stream_eof:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R1CoA
function name:  stream_eof
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   <true>
   19     1*     > RETURN                                                   null

End of function stream_eof

Function stream_set_option:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R1CoA
function name:  stream_set_option
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E > > RETURN                                                   <true>
   24     1*     > RETURN                                                   null

End of function stream_set_option

Function stream_seek:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R1CoA
function name:  stream_seek
number of ops:  4
compiled vars:  !0 = $offset, !1 = $whence
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   28     2      > RETURN                                                   <false>
   29     3*     > RETURN                                                   null

End of function stream_seek

End of class AttackStream.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.02 ms | 1392 KiB | 19 Q