3v4l.org

run code in 300+ PHP versions simultaneously
<?php class simple_filter extends php_user_filter { function filter($in, $out, &$consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { $consumed += $bucket->datalen; stream_bucket_append($out, $bucket); } return PSFS_PASS_ON; } } stream_filter_register("simple", "simple_filter"); $url = "http://google.com"; file_get_contents("php://filter/read=simple/resource=http://google.com");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tf2i1
function name:  (null)
number of ops:  9
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'stream_filter_register'
          1        SEND_VAL                                                 'simple'
          2        SEND_VAL                                                 'simple_filter'
          3        DO_ICALL                                                 
   17     4        ASSIGN                                                   !0, 'http%3A%2F%2Fgoogle.com'
   18     5        INIT_FCALL                                               'file_get_contents'
          6        SEND_VAL                                                 'php%3A%2F%2Ffilter%2Fread%3Dsimple%2Fresource%3Dhttp%3A%2F%2Fgoogle.com'
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Class simple_filter:
Function filter:
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 = 16, Position 2 = 5
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 5
Branch analysis from position: 16
Branch analysis from position: 5
filename:       /in/tf2i1
function name:  filter
number of ops:  18
compiled vars:  !0 = $in, !1 = $out, !2 = $consumed, !3 = $closing, !4 = $bucket
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    7     4      > JMP                                                      ->11
    8     5    >   FETCH_OBJ_R                                      ~5      !4, 'datalen'
          6        ASSIGN_OP                                     1          !2, ~5
    9     7        INIT_FCALL                                               'stream_bucket_append'
          8        SEND_VAR                                                 !1
          9        SEND_VAR                                                 !4
         10        DO_ICALL                                                 
    7    11    >   INIT_FCALL                                               'stream_bucket_make_writeable'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        ASSIGN                                           ~9      !4, $8
         15      > JMPNZ                                                    ~9, ->5
   11    16    > > RETURN                                                   2
   12    17*     > RETURN                                                   null

End of function filter

End of class simple_filter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.09 ms | 1396 KiB | 21 Q