3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { function __construct() { register_shutdown_function( array( $this, '__destruct' ) ); } function bar() { } function __destruct() { return true; } } $GLOBALS['fb'] = new foo; function foo_bar( $buffer ) { $buffer .= "gettype( 'fb' ): " . gettype( $GLOBALS['fb'] ); return $buffer; } ob_start( 'foo_bar' );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L4O6I
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $2      'foo'
          1        DO_FCALL                                      0          
          2        FETCH_W                      global              $0      'GLOBALS'
          3        ASSIGN_DIM                                               $0, 'fb'
          4        OP_DATA                                                  $2
   23     5        INIT_FCALL                                               'ob_start'
          6        SEND_VAL                                                 'foo_bar'
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function foo_bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L4O6I
function name:  foo_bar
number of ops:  8
compiled vars:  !0 = $buffer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        FETCH_R                      global              ~1      'GLOBALS'
          2        FETCH_DIM_R                                      ~2      ~1, 'fb'
          3        GET_TYPE                                         ~3      ~2
          4        CONCAT                                           ~4      'gettype%28+%27fb%27+%29%3A+', ~3
          5        ASSIGN_OP                                     8          !0, ~4
   20     6      > RETURN                                                   !0
   21     7*     > RETURN                                                   null

End of function foo_bar

Class foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L4O6I
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'register_shutdown_function'
          1        FETCH_THIS                                       ~0      
          2        INIT_ARRAY                                       ~1      ~0
          3        ADD_ARRAY_ELEMENT                                ~1      '__destruct'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
    6     6      > RETURN                                                   null

End of function __construct

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

End of function bar

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

End of function __destruct

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.99 ms | 1400 KiB | 17 Q