3v4l.org

run code in 300+ PHP versions simultaneously
<?php $bucket = stream_bucket_new(fopen('php://temp', 'w+'), ''); class bucketFilter { public function filter($in, $out, &$consumed, $closing ){ $bucket = stream_bucket_new(fopen('php://temp', 'w+'), 'FOO'); stream_bucket_append($out, $bucket); return PSFS_PASS_ON; } } stream_filter_register('bucketfault', 'bucketFilter'); stream_filter_append($s = fopen('php://temp', 'r+'), 'bucketfault'); stream_get_contents($s); echo "Done\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OYCXS
function name:  (null)
number of ops:  27
compiled vars:  !0 = $bucket, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'stream_bucket_new'
          1        INIT_FCALL                                               'fopen'
          2        SEND_VAL                                                 'php%3A%2F%2Ftemp'
          3        SEND_VAL                                                 'w%2B'
          4        DO_ICALL                                         $2      
          5        SEND_VAR                                                 $2
          6        SEND_VAL                                                 ''
          7        DO_ICALL                                         $3      
          8        ASSIGN                                                   !0, $3
   14     9        INIT_FCALL                                               'stream_filter_register'
         10        SEND_VAL                                                 'bucketfault'
         11        SEND_VAL                                                 'bucketFilter'
         12        DO_ICALL                                                 
   15    13        INIT_FCALL                                               'stream_filter_append'
         14        INIT_FCALL                                               'fopen'
         15        SEND_VAL                                                 'php%3A%2F%2Ftemp'
         16        SEND_VAL                                                 'r%2B'
         17        DO_ICALL                                         $6      
         18        ASSIGN                                           ~7      !1, $6
         19        SEND_VAL                                                 ~7
         20        SEND_VAL                                                 'bucketfault'
         21        DO_ICALL                                                 
   16    22        INIT_FCALL                                               'stream_get_contents'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                                 
   18    25        ECHO                                                     'Done%0A'
         26      > RETURN                                                   1

Class bucketFilter:
Function filter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/OYCXS
function name:  filter
number of ops:  19
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      
    8     4        INIT_FCALL                                               'stream_bucket_new'
          5        INIT_FCALL                                               'fopen'
          6        SEND_VAL                                                 'php%3A%2F%2Ftemp'
          7        SEND_VAL                                                 'w%2B'
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        SEND_VAL                                                 'FOO'
         11        DO_ICALL                                         $6      
         12        ASSIGN                                                   !4, $6
    9    13        INIT_FCALL                                               'stream_bucket_append'
         14        SEND_VAR                                                 !1
         15        SEND_VAR                                                 !4
         16        DO_ICALL                                                 
   10    17      > RETURN                                                   2
   11    18*     > RETURN                                                   null

End of function filter

End of class bucketFilter.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.28 ms | 1400 KiB | 25 Q