3v4l.org

run code in 500+ PHP versions simultaneously
<?php class foo { function bar() { } } $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/eO8t0
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   NEW                                                  $1      'foo'
          1        DO_FCALL                                          0          
          2        FETCH_W                          global              $0      'fb'
          3        ASSIGN                                                       $0, $1
   16     4        INIT_FCALL                                                   'ob_start'
          5        SEND_VAL                                                     'foo_bar'
          6        DO_ICALL                                                     
          7      > RETURN                                                       1

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

End of function foo_bar

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

End of function bar

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
197.23 ms | 3279 KiB | 14 Q