3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testStreamWrapper { function stream_lock($operation) { var_dump($operation); return true; } function stream_open($path, $mode, $options, $opened_path) { return true; } } stream_wrapper_register('test', 'TestStreamWrapper'); $fp = fopen('test://waa', 'w+'); flock($fp, LOCK_SH); flock($fp, LOCK_EX); flock($fp, LOCK_UN); flock($fp, LOCK_SH | LOCK_NB); flock($fp, LOCK_EX | LOCK_NB);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h1SVU
function name:  (null)
number of ops:  30
compiled vars:  !0 = $fp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'stream_wrapper_register'
          1        SEND_VAL                                                 'test'
          2        SEND_VAL                                                 'TestStreamWrapper'
          3        DO_ICALL                                                 
   15     4        INIT_FCALL                                               'fopen'
          5        SEND_VAL                                                 'test%3A%2F%2Fwaa'
          6        SEND_VAL                                                 'w%2B'
          7        DO_ICALL                                         $2      
          8        ASSIGN                                                   !0, $2
   16     9        INIT_FCALL                                               'flock'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 1
         12        DO_ICALL                                                 
   17    13        INIT_FCALL                                               'flock'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 2
         16        DO_ICALL                                                 
   18    17        INIT_FCALL                                               'flock'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 3
         20        DO_ICALL                                                 
   19    21        INIT_FCALL                                               'flock'
         22        SEND_VAR                                                 !0
         23        SEND_VAL                                                 5
         24        DO_ICALL                                                 
   20    25        INIT_FCALL                                               'flock'
         26        SEND_VAR                                                 !0
         27        SEND_VAL                                                 6
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Class testStreamWrapper:
Function stream_lock:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/h1SVU
function name:  stream_lock
number of ops:  6
compiled vars:  !0 = $operation
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4      > RETURN                                                   <true>
    7     5*     > RETURN                                                   null

End of function stream_lock

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

End of function stream_open

End of class testStreamWrapper.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.55 ms | 1400 KiB | 21 Q