3v4l.org

run code in 300+ PHP versions simultaneously
<?php class DummyStream { public function stream_open($path, $mode, $options, &$opened_path) { echo 'open'; return true; } public function stream_read($count) { var_dump($count); return false; } public function stream_eof() { echo 'eof'; return false; } public function stream_seek($offset, $whence) { echo 'seek'; return true; } public function stream_tell() { echo 'tell'; return 0; } } stream_wrapper_register('dummy', 'DummyStream'); $fp = fopen('dummy://foo/bar', 'r'); fread($fp, 16);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SLn2k
function name:  (null)
number of ops:  14
compiled vars:  !0 = $fp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'stream_wrapper_register'
          1        SEND_VAL                                                 'dummy'
          2        SEND_VAL                                                 'DummyStream'
          3        DO_ICALL                                                 
   11     4        INIT_FCALL                                               'fopen'
          5        SEND_VAL                                                 'dummy%3A%2F%2Ffoo%2Fbar'
          6        SEND_VAL                                                 'r'
          7        DO_ICALL                                         $2      
          8        ASSIGN                                                   !0, $2
   12     9        INIT_FCALL                                               'fread'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 16
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class DummyStream:
Function stream_open:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SLn2k
function name:  stream_open
number of ops:  7
compiled vars:  !0 = $path, !1 = $mode, !2 = $options, !3 = $opened_path
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
          4        ECHO                                                     'open'
          5      > RETURN                                                   <true>
          6*     > 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/SLn2k
function name:  stream_read
number of ops:  6
compiled vars:  !0 = $count
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
          4      > RETURN                                                   <false>
          5*     > 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/SLn2k
function name:  stream_eof
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ECHO                                                     'eof'
          1      > RETURN                                                   <false>
          2*     > RETURN                                                   null

End of function stream_eof

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

End of function stream_seek

Function stream_tell:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SLn2k
function name:  stream_tell
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ECHO                                                     'tell'
          1      > RETURN                                                   0
          2*     > RETURN                                                   null

End of function stream_tell

End of class DummyStream.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.09 ms | 1392 KiB | 21 Q