3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AnotherClass{ public $world = "world"; } $anotherClass = new AnotherClass(); class TestClass{ function __construct(){ ob_start(array($this,"callback")); } function callback($input){ global $anotherClass; return $input. get_class($antherClass) . $anotherClass->world; } } $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/nXkcE
function name:  (null)
number of ops:  8
compiled vars:  !0 = $anotherClass, !1 = $tClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   NEW                                              $2      'AnotherClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   18     3        NEW                                              $5      'TestClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   20     6        ECHO                                                     'hello'
   22     7      > RETURN                                                   1

Class AnotherClass: [no user functions]
Class TestClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nXkcE
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     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                                                 
   10     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/nXkcE
function name:  callback
number of ops:  8
compiled vars:  !0 = $input, !1 = $anotherClass, !2 = $antherClass
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        BIND_GLOBAL                                              !1, 'anotherClass'
   14     2        GET_CLASS                                        ~3      !2
          3        CONCAT                                           ~4      !0, ~3
          4        FETCH_OBJ_R                                      ~5      !1, 'world'
          5        CONCAT                                           ~6      ~4, ~5
          6      > RETURN                                                   ~6
   15     7*     > RETURN                                                   null

End of function callback

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.89 ms | 1396 KiB | 15 Q