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($anssstherClass) . 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/L4pOF
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/L4pOF
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/L4pOF
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/L4pOF
function name:  callback
number of ops:  4
compiled vars:  !0 = $input, !1 = $anotherClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   17     1        BIND_GLOBAL                                              !1, 'anotherClass'
   18     2      > RETURN                                                   !0
   19     3*     > RETURN                                                   null

End of function callback

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.21 ms | 1396 KiB | 15 Q