3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ThingManager { private function createThing($arg) { return new Thing($this, $arg); } public function doSomething() { return $this->createThing(1); } } class Thing { private $manager; private $otherArg; public function __construct(ThingManager $manager, $otherArg) { $this->manager = $manager; $this->otherArg = $otherArg; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k7P68
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E > > RETURN                                                   1

Class ThingManager:
Function creatething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k7P68
function name:  createThing
number of ops:  8
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        NEW                                              $1      'Thing'
          2        FETCH_THIS                                       $2      
          3        SEND_VAR_EX                                              $2
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6      > RETURN                                                   $1
    8     7*     > RETURN                                                   null

End of function creatething

Function dosomething:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k7P68
function name:  doSomething
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_METHOD_CALL                                         'createThing'
          1        SEND_VAL                                                 1
          2        DO_FCALL                                      0  $0      
          3      > RETURN                                                   $0
   13     4*     > RETURN                                                   null

End of function dosomething

End of class ThingManager.

Class Thing:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/k7P68
function name:  __construct
number of ops:  7
compiled vars:  !0 = $manager, !1 = $otherArg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   23     2        ASSIGN_OBJ                                               'manager'
          3        OP_DATA                                                  !0
   24     4        ASSIGN_OBJ                                               'otherArg'
          5        OP_DATA                                                  !1
   25     6      > RETURN                                                   null

End of function __construct

End of class Thing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.34 ms | 1395 KiB | 13 Q