3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MessageParser { private $messageFactory; private $headerFactory; public function __construct(MessageFactory $messageFactory, HeaderFactory $headerFactory) { $this->messageFactory = $messageFactory; $this->headerFactory = $headerFactory; } // members } class Message { // members } class Header { // members } class MessageParserFactory { private $messageFactory; private $headerFactory; public function __construct(MessageFactory $messageFactory, HeaderFactory $headerFactory) { $this->messageFactory = $messageFactory; $this->headerFactory = $headerFactory; } public function create() { return new MessageParser($this->messageFactory, $this->headerFactory); } } class MessageFactory { public function create() { return Message; } } class HeaderFactory { public function create() { return Header; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oOTA0
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   60     0  E > > RETURN                                                   1

Class MessageParser:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oOTA0
function name:  __construct
number of ops:  7
compiled vars:  !0 = $messageFactory, !1 = $headerFactory
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        ASSIGN_OBJ                                               'messageFactory'
          3        OP_DATA                                                  !0
   12     4        ASSIGN_OBJ                                               'headerFactory'
          5        OP_DATA                                                  !1
   13     6      > RETURN                                                   null

End of function __construct

End of class MessageParser.

Class Message: [no user functions]
Class Header: [no user functions]
Class MessageParserFactory:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oOTA0
function name:  __construct
number of ops:  7
compiled vars:  !0 = $messageFactory, !1 = $headerFactory
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   34     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   36     2        ASSIGN_OBJ                                               'messageFactory'
          3        OP_DATA                                                  !0
   37     4        ASSIGN_OBJ                                               'headerFactory'
          5        OP_DATA                                                  !1
   38     6      > RETURN                                                   null

End of function __construct

Function create:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oOTA0
function name:  create
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   NEW                                              $0      'MessageParser'
          1        CHECK_FUNC_ARG                                           
          2        FETCH_OBJ_FUNC_ARG                               $1      'messageFactory'
          3        SEND_FUNC_ARG                                            $1
          4        CHECK_FUNC_ARG                                           
          5        FETCH_OBJ_FUNC_ARG                               $2      'headerFactory'
          6        SEND_FUNC_ARG                                            $2
          7        DO_FCALL                                      0          
          8      > RETURN                                                   $0
   43     9*     > RETURN                                                   null

End of function create

End of class MessageParserFactory.

Class MessageFactory:
Function create:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oOTA0
function name:  create
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   50     0  E >   FETCH_CONSTANT                                   ~0      'Message'
          1      > RETURN                                                   ~0
   51     2*     > RETURN                                                   null

End of function create

End of class MessageFactory.

Class HeaderFactory:
Function create:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/oOTA0
function name:  create
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   58     0  E >   FETCH_CONSTANT                                   ~0      'Header'
          1      > RETURN                                                   ~0
   59     2*     > RETURN                                                   null

End of function create

End of class HeaderFactory.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.2 ms | 1399 KiB | 13 Q