3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Stream { public function stream_open($path, $mode, $options, $opened_path) { return true; } public function stream_write($data) { return (int) (strlen($data) - 2); } } stream_wrapper_register('test', 'Stream'); file_put_contents('test://file.txt', 'foobarbaz');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vsuCC
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                                   'stream_wrapper_register'
          1        SEND_VAL                                                     'test'
          2        SEND_VAL                                                     'Stream'
          3        DO_ICALL                                                     
   17     4        INIT_FCALL                                                   'file_put_contents'
          5        SEND_VAL                                                     'test%3A%2F%2Ffile.txt'
          6        SEND_VAL                                                     'foobarbaz'
          7        DO_ICALL                                                     
          8      > RETURN                                                       1

Class Stream:
Function stream_open:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vsuCC
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_write:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vsuCC
function name:  stream_write
number of ops:  6
compiled vars:  !0 = $data
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
   12     1        STRLEN                                               ~1      !0
          2        SUB                                                  ~2      ~1, 2
          3        CAST                                              4  ~3      ~2
          4      > RETURN                                                       ~3
   13     5*     > RETURN                                                       null

End of function stream_write

End of class Stream.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
156.65 ms | 2631 KiB | 15 Q