3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyDummyWrapper { /** @var resource */ public $context; public function stream_open() { return true; } public function __call($m, $v): void { var_dump([$m, $v]); } } ini_set('open_basedir', __DIR__); stream_wrapper_register('foo', MyDummyWrapper::class); file_get_contents('foo://test'); ini_set('error_log', 'foo://test');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AEfvC
function name:  (null)
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'ini_set'
          1        SEND_VAL                                                 'open_basedir'
          2        SEND_VAL                                                 '%2Fin'
          3        DO_ICALL                                                 
   20     4        INIT_FCALL                                               'stream_wrapper_register'
          5        SEND_VAL                                                 'foo'
          6        SEND_VAL                                                 'MyDummyWrapper'
          7        DO_ICALL                                                 
   22     8        INIT_FCALL                                               'file_get_contents'
          9        SEND_VAL                                                 'foo%3A%2F%2Ftest'
         10        DO_ICALL                                                 
   24    11        INIT_FCALL                                               'ini_set'
         12        SEND_VAL                                                 'error_log'
         13        SEND_VAL                                                 'foo%3A%2F%2Ftest'
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

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

End of function stream_open

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AEfvC
function name:  __call
number of ops:  8
compiled vars:  !0 = $m, !1 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   14     2        INIT_FCALL                                               'var_dump'
          3        INIT_ARRAY                                       ~2      !0
          4        ADD_ARRAY_ELEMENT                                ~2      !1
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
   15     7      > RETURN                                                   null

End of function __call

End of class MyDummyWrapper.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.48 ms | 1006 KiB | 17 Q