3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace WFPKSYS\Traits; { trait SupportSystemConfiguration { protected $_supportSystemConfiguration; public function getSupportSystemConfiguration() : \WFPKSYS\SupportSystemConfiguration { return $this->_supportSystemConfiguration; } public function setSupportSystemConfiguration( \WFPKSYS\SupportSystemConfiguration $supportSystemConfiguration ) : void { $this->_supportSystemConfiguration = $supportSystemConfiguration; } } } namespace WFPKSYS; { class SupportSystemConfiguration { private $_db_Name; public function __construct( string $dbName ) {$this->setDb_Name( $dbName );} public function getDb_Name() : string { return $this->_db_Name; } public function setDb_Name( string $db_Name ) : void { $this->_db_Name = $db_Name; } } } namespace WFPKSYS\Set1; { class Foo { use \WFPKSYS\Traits\SupportSystemConfiguration; public function __construct(\WFPKSYS\SupportSystemConfiguration $supportSystemConfig) { $this->setSupportSystemConfiguration( $supportSystemConfig ); } public function displayCheck() : void { #do something that doesnt return anything } } } namespace WFPKSYS\Set3; { class Fuzz { use \WFPKSYS\Traits\SupportSystemConfiguration; public function __construct(\WFPKSYS\SupportSystemConfiguration $supportSystemConfig ) { $this->setSupportSystemConfiguration( $supportSystemConfig ); } public function performCheck() : string { $objFoo = new \WFPKSYS\Set1\Foo( $this->getSupportSystemConfiguration() ); $objFoo->displayCheck(); return "completed"; } } } $objSupportSystemConfiguration = new \WFPKSYS\SupportSystemConfiguration( "MyTestDb" ); $objFuzz = new \WFPKSYS\Set3\Fuzz( $objSupportSystemConfiguration ); echo $objFuzz->performCheck();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  (null)
number of ops:  14
compiled vars:  !0 = $objSupportSystemConfiguration, !1 = $objFuzz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     0  E >   DECLARE_CLASS                                            'wfpksys%5Cset1%5Cfoo'
   42     1        DECLARE_CLASS                                            'wfpksys%5Cset3%5Cfuzz'
   62     2        NEW                                              $2      'WFPKSYS%5CSupportSystemConfiguration'
          3        SEND_VAL_EX                                              'MyTestDb'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   64     6        NEW                                              $5      'WFPKSYS%5CSet3%5CFuzz'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $5
   66    10        INIT_METHOD_CALL                                         !1, 'performCheck'
         11        DO_FCALL                                      0  $8      
         12        ECHO                                                     $8
         13      > RETURN                                                   1

Class WFPKSYS\Traits\SupportSystemConfiguration:
Function getsupportsystemconfiguration:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  getSupportSystemConfiguration
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   FETCH_OBJ_R                                      ~0      '_supportSystemConfiguration'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
          3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function getsupportsystemconfiguration

Function setsupportsystemconfiguration:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  setSupportSystemConfiguration
number of ops:  4
compiled vars:  !0 = $supportSystemConfiguration
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        ASSIGN_OBJ                                               '_supportSystemConfiguration'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function setsupportsystemconfiguration

End of class WFPKSYS\Traits\SupportSystemConfiguration.

Class WFPKSYS\SupportSystemConfiguration:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  __construct
number of ops:  5
compiled vars:  !0 = $dbName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   19     1        INIT_METHOD_CALL                                         'setDb_Name'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   null

End of function __construct

Function getdb_name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  getDb_Name
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_OBJ_R                                      ~0      '_db_Name'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
          3*       VERIFY_RETURN_TYPE                                       
          4*     > RETURN                                                   null

End of function getdb_name

Function setdb_name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  setDb_Name
number of ops:  4
compiled vars:  !0 = $db_Name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   RECV                                             !0      
   23     1        ASSIGN_OBJ                                               '_db_Name'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function setdb_name

End of class WFPKSYS\SupportSystemConfiguration.

Class WFPKSYS\Set1\Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  __construct
number of ops:  5
compiled vars:  !0 = $supportSystemConfig
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   RECV                                             !0      
   32     1        INIT_METHOD_CALL                                         'setSupportSystemConfiguration'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   null

End of function __construct

Function displaycheck:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  displayCheck
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E > > RETURN                                                   null

End of function displaycheck

End of class WFPKSYS\Set1\Foo.

Class WFPKSYS\Set3\Fuzz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  __construct
number of ops:  5
compiled vars:  !0 = $supportSystemConfig
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   RECV                                             !0      
   46     1        INIT_METHOD_CALL                                         'setSupportSystemConfiguration'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   null

End of function __construct

Function performcheck:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CGJZt
function name:  performCheck
number of ops:  11
compiled vars:  !0 = $objFoo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   50     0  E >   NEW                                              $1      'WFPKSYS%5CSet1%5CFoo'
          1        INIT_METHOD_CALL                                         'getSupportSystemConfiguration'
          2        DO_FCALL                                      0  $2      
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   52     6        INIT_METHOD_CALL                                         !0, 'displayCheck'
          7        DO_FCALL                                      0          
   54     8      > RETURN                                                   'completed'
   56     9*       VERIFY_RETURN_TYPE                                       
         10*     > RETURN                                                   null

End of function performcheck

End of class WFPKSYS\Set3\Fuzz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.08 ms | 1407 KiB | 13 Q