3v4l.org

run code in 300+ 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:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'foo'
          1        DO_FCALL                                      0          
          2        FETCH_W                      global              $0      'GLOBALS'
          3        ASSIGN_DIM                                               $0, 'fb'
          4        OP_DATA                                                  $2
   16     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/eO8t0
function name:  foo_bar
number of ops:  8
compiled vars:  !0 = $buffer
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     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
   13     6      > RETURN                                                   !0
   14     7*     > 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.0.0


preferences:
148.91 ms | 1395 KiB | 15 Q