3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { protected $buffer = false; function bar($b) { $this->buffer = $b; return ''; } function eh($e) { ob_start(array($this, 'bar')); echo '123'; } } function sh() { return; } register_shutdown_function('sh'); set_exception_handler(array(new foo, 'eh')); throw new Exception;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/XDrtm
function name:  (null)
number of ops:  14
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   INIT_FCALL                                               'register_shutdown_function'
          1        SEND_VAL                                                 'sh'
          2        DO_ICALL                                                 
   27     3        INIT_FCALL                                               'set_exception_handler'
          4        NEW                                              $1      'foo'
          5        DO_FCALL                                      0          
          6        INIT_ARRAY                                       ~3      $1
          7        ADD_ARRAY_ELEMENT                                ~3      'eh'
          8        SEND_VAL                                                 ~3
          9        DO_ICALL                                                 
   28    10        NEW                                              $5      'Exception'
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $5
         13*     > RETURN                                                   1

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

End of function sh

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XDrtm
function name:  bar
number of ops:  5
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        ASSIGN_OBJ                                               'buffer'
          2        OP_DATA                                                  !0
   11     3      > RETURN                                                   ''
   12     4*     > RETURN                                                   null

End of function bar

Function eh:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XDrtm
function name:  eh
number of ops:  9
compiled vars:  !0 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        INIT_FCALL                                               'ob_start'
          2        FETCH_THIS                                       ~1      
          3        INIT_ARRAY                                       ~2      ~1
          4        ADD_ARRAY_ELEMENT                                ~2      'bar'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
   17     7        ECHO                                                     '123'
   18     8      > RETURN                                                   null

End of function eh

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.82 ms | 1396 KiB | 19 Q