3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace WFPKSYS; { 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() {$this->setDb_Name( "MyTestDb" );} public function getDb_Name() : string { return $this->_db_Name; } public function setDb_Name( string $db_Name ) : void { $this->_db_Name = $db_Name; } } } namespace WFPKSYS\Set2; { class Foo { use \WFPKSYS\SupportSystemConfiguration; public function __construct(\WFPKSYS\SupportSystemConfiguration $supportSystemConfig) { $this->setSupportSystemConfiguration( $supportSystemConfig ); } public function displayCheck() : void { #do something that doesnt return anything } } } namespace WFPKSYS\Set2; { class Bar { use \WFPKSYS\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\SupportSystemConfiguration; public function __construct(\WFPKSYS\SupportSystemConfiguration $supportSystemConfig ) { $this->setSupportSystemConfiguration( $supportSystemConfig ); } public function performCheck() : string { $objFoo = new \WFPKSYS\Set1\Foo( $this->getSupportSystemConfiguration() ); $objBar = new \WFPKSYS\Set2\Bar( $this->getSupportSystemConfiguration() ); $objFoo->displayCheck(); $objBar->displayCheck(); return "completed"; } } } $objSupportSystemConfiguration = new \WFPKSYS\SupportSystemConfiguration(); $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/4Q511
function name:  (null)
number of ops:  15
compiled vars:  !0 = $objSupportSystemConfiguration, !1 = $objFuzz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   DECLARE_CLASS                                            'wfpksys%5Csupportsystemconfiguration'
   36     1        DECLARE_CLASS                                            'wfpksys%5Cset2%5Cfoo'
   54     2        DECLARE_CLASS                                            'wfpksys%5Cset2%5Cbar'
   72     3        DECLARE_CLASS                                            'wfpksys%5Cset3%5Cfuzz'
   95     4        NEW                                              $2      'WFPKSYS%5CSupportSystemConfiguration'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   97     7        NEW                                              $5      'WFPKSYS%5CSet3%5CFuzz'
          8        SEND_VAR_EX                                              !0
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !1, $5
   99    11        INIT_METHOD_CALL                                         !1, 'performCheck'
         12        DO_FCALL                                      0  $8      
         13        ECHO                                                     $8
         14      > RETURN                                                   1

Class WFPKSYS\SupportSystemConfiguration:
Function getsupportsystemconfiguration:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Q511
function name:  getSupportSystemConfiguration
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     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/4Q511
function name:  setSupportSystemConfiguration
number of ops:  4
compiled vars:  !0 = $supportSystemConfiguration
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        ASSIGN_OBJ                                               '_supportSystemConfiguration'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function setsupportsystemconfiguration

End of class WFPKSYS\SupportSystemConfiguration.

Class WFPKSYS\SupportSystemConfiguration:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Q511
function name:  __construct
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   INIT_METHOD_CALL                                         'setDb_Name'
          1        SEND_VAL_EX                                              'MyTestDb'
          2        DO_FCALL                                      0          
          3      > 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/4Q511
function name:  getDb_Name
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   28     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/4Q511
function name:  setDb_Name
number of ops:  4
compiled vars:  !0 = $db_Name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   RECV                                             !0      
   30     1        ASSIGN_OBJ                                               '_db_Name'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function setdb_name

End of class WFPKSYS\SupportSystemConfiguration.

Class WFPKSYS\Set2\Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Q511
function name:  __construct
number of ops:  5
compiled vars:  !0 = $supportSystemConfig
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   RECV                                             !0      
   41     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/4Q511
function name:  displayCheck
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   46     0  E > > RETURN                                                   null

End of function displaycheck

End of class WFPKSYS\Set2\Foo.

Class WFPKSYS\Set2\Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Q511
function name:  __construct
number of ops:  5
compiled vars:  !0 = $supportSystemConfig
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   58     0  E >   RECV                                             !0      
   59     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/4Q511
function name:  displayCheck
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   64     0  E > > RETURN                                                   null

End of function displaycheck

End of class WFPKSYS\Set2\Bar.

Class WFPKSYS\Set3\Fuzz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4Q511
function name:  __construct
number of ops:  5
compiled vars:  !0 = $supportSystemConfig
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   76     0  E >   RECV                                             !0      
   77     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/4Q511
function name:  performCheck
number of ops:  19
compiled vars:  !0 = $objFoo, !1 = $objBar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   81     0  E >   NEW                                              $2      'WFPKSYS%5CSet1%5CFoo'
          1        INIT_METHOD_CALL                                         'getSupportSystemConfiguration'
          2        DO_FCALL                                      0  $3      
          3        SEND_VAR_NO_REF_EX                                       $3
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   82     6        NEW                                              $6      'WFPKSYS%5CSet2%5CBar'
          7        INIT_METHOD_CALL                                         'getSupportSystemConfiguration'
          8        DO_FCALL                                      0  $7      
          9        SEND_VAR_NO_REF_EX                                       $7
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $6
   84    12        INIT_METHOD_CALL                                         !0, 'displayCheck'
         13        DO_FCALL                                      0          
   85    14        INIT_METHOD_CALL                                         !1, 'displayCheck'
         15        DO_FCALL                                      0          
   87    16      > RETURN                                                   'completed'
   89    17*       VERIFY_RETURN_TYPE                                       
         18*     > RETURN                                                   null

End of function performcheck

End of class WFPKSYS\Set3\Fuzz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.97 ms | 1403 KiB | 13 Q