3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AnotherClass{ public $world = "world"; public function doIt() { return $this->world; } } $anotherClass = new AnotherClass(); class TestClass{ function __construct(){ ob_start(array($this,"callback")); } function callback($input){ global $anotherClass; return $input. get_class($antherClass) . var_export($anotherClass->world, true); } } $tClass = new TestClass(); echo "hello"; //ob_flush();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AigRa
function name:  (null)
number of ops:  8
compiled vars:  !0 = $anotherClass, !1 = $tClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'AnotherClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   22     3        NEW                                              $5      'TestClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   24     6        ECHO                                                     'hello'
   26     7      > RETURN                                                   1

Class AnotherClass:
Function doit:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AigRa
function name:  doIt
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   FETCH_OBJ_R                                      ~0      'world'
          1      > RETURN                                                   ~0
    7     2*     > RETURN                                                   null

End of function doit

End of class AnotherClass.

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

End of function __construct

Function callback:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AigRa
function name:  callback
number of ops:  12
compiled vars:  !0 = $input, !1 = $anotherClass, !2 = $antherClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        BIND_GLOBAL                                              !1, 'anotherClass'
   18     2        GET_CLASS                                        ~3      !2
          3        CONCAT                                           ~4      !0, ~3
          4        INIT_FCALL                                               'var_export'
          5        FETCH_OBJ_R                                      ~5      !1, 'world'
          6        SEND_VAL                                                 ~5
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $6      
          9        CONCAT                                           ~7      ~4, $6
         10      > RETURN                                                   ~7
   19    11*     > RETURN                                                   null

End of function callback

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.66 ms | 1392 KiB | 17 Q