3v4l.org

run code in 500+ PHP versions simultaneously
<?php class StreamTest { function stream_open($path, $mode, $options, &$opened_path) { return true; } function stream_close() { return ; } function stream_lock($mode) { printf( "0x%x\n", $mode ) ; return ; } } stream_register_wrapper("streamtest", "StreamTest"); $handle = fopen( 'streamtest://test', "r" ) ; flock( $handle, LOCK_EX ) ; flock( $handle, LOCK_UN ) ; fclose($handle) ;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7HCA8
function name:  (null)
number of ops:  21
compiled vars:  !0 = $handle
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                                   'stream_register_wrapper'
          1        SEND_VAL                                                     'streamtest'
          2        SEND_VAL                                                     'StreamTest'
          3        DO_ICALL                                                     
   16     4        INIT_FCALL                                                   'fopen'
          5        SEND_VAL                                                     'streamtest%3A%2F%2Ftest'
          6        SEND_VAL                                                     'r'
          7        DO_ICALL                                             $2      
          8        ASSIGN                                                       !0, $2
   17     9        INIT_FCALL                                                   'flock'
         10        SEND_VAR                                                     !0
         11        SEND_VAL                                                     2
         12        DO_ICALL                                                     
   18    13        INIT_FCALL                                                   'flock'
         14        SEND_VAR                                                     !0
         15        SEND_VAL                                                     3
         16        DO_ICALL                                                     
   19    17        INIT_FCALL                                                   'fclose'
         18        SEND_VAR                                                     !0
         19        DO_ICALL                                                     
         20      > RETURN                                                       1

Class StreamTest:
Function stream_open:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7HCA8
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
-----------------------------------------------------------------------------------------
    4     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
          3        RECV                                                 !3      
    5     4      > RETURN                                                       <true>
    6     5*     > RETURN                                                       null

End of function stream_open

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

End of function stream_close

Function stream_lock:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7HCA8
function name:  stream_lock
number of ops:  7
compiled vars:  !0 = $mode
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   10     0  E >   RECV                                                 !0      
   11     1        INIT_FCALL                                                   'printf'
          2        SEND_VAL                                                     '0x%25x%0A'
          3        SEND_VAR                                                     !0
          4        DO_ICALL                                                     
   12     5      > RETURN                                                       null
   13     6*     > RETURN                                                       null

End of function stream_lock

End of class StreamTest.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
180.79 ms | 2075 KiB | 18 Q