3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace WFPKSYS\System\Traits\Configuration; { trait SupportSystemConfiguration { protected $_supportSystemConfiguration; public function getSupportSystemConfiguration() : \WFPKSYS\SupportSystem\Models\Configuration\SupportSystemConfiguration { return $this->_supportSystemConfiguration; } public function setSupportSystemConfiguration( \WFPKSYS\SupportSystem\Models\Configuration\SupportSystemConfiguration $supportSystemConfiguration ) : void { $this->_supportSystemConfiguration = $supportSystemConfiguration; } } } namespace WFPKSYS\SupportSystem\Models\Configuration; { 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\SupportSystem\Models; { class Foo { use \WFPKSYS\System\Traits\Configuration\SupportSystemConfiguration; public function __construct(\WFPKSYS\SupportSystem\Models\Configuration\SupportSystemConfiguration $supportSystemConfig) { $this->setSupportSystemConfiguration( $supportSystemConfig ); } public function displayCheck() : void { #do something that doesnt return anything } } } namespace WFPKSYS\SupportSystem\Models; { class Bar { use \WFPKSYS\System\Traits\Configuration\SupportSystemConfiguration; public function __construct(\WFPKSYS\SupportSystem\Models\Configuration\SupportSystemConfiguration $supportSystemConfig) {$this->setSupportSystemConfiguration( $supportSystemConfig );} public function displayCheck() : void { #do something that doesnt return anything } } } namespace WFPKSYS\SupportSystem\Models; { class Fuzz { use \WFPKSYS\System\Traits\Configuration\SupportSystemConfiguration; public function __construct(\WFPKSYS\SupportSystem\Models\Configuration\SupportSystemConfiguration $supportSystemConfig ) { $this->setSupportSystemConfiguration( $supportSystemConfig ); } public function performCheck() : string { $objFoo = new \WFPKSYS\SupportSystem\Models\Foo( $this->getSupportSystemConfiguration() ); $objBar = new \WFPKSYS\SupportSystem\Models\Bar( $this->getSupportSystemConfiguration() ); $objFoo->displayCheck(); $objBar->displayCheck(); return "completed"; } } } $objSupportSystemConfiguration = new \WFPKSYS\SupportSystem\Models\Configuration\SupportSystemConfiguration(); $objFuzz = new \WFPKSYS\SupportSystem\Models\Fuzz( $objSupportSystemConfiguration ); echo $objFuzz->performCheck();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5AcD7
function name:  (null)
number of ops:  14
compiled vars:  !0 = $objSupportSystemConfiguration, !1 = $objFuzz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   36     0  E >   DECLARE_CLASS                                            'wfpksys%5Csupportsystem%5Cmodels%5Cfoo'
   54     1        DECLARE_CLASS                                            'wfpksys%5Csupportsystem%5Cmodels%5Cbar'
   72     2        DECLARE_CLASS                                            'wfpksys%5Csupportsystem%5Cmodels%5Cfuzz'
   95     3        NEW                                              $2      'WFPKSYS%5CSupportSystem%5CModels%5CConfiguration%5CSupportSystemConfiguration'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   97     6        NEW                                              $5      'WFPKSYS%5CSupportSystem%5CModels%5CFuzz'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $5
   99    10        INIT_METHOD_CALL                                         !1, 'performCheck'
         11        DO_FCALL                                      0  $8      
         12        ECHO                                                     $8
         13      > RETURN                                                   1

Class WFPKSYS\System\Traits\Configuration\SupportSystemConfiguration:
Function getsupportsystemconfiguration:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5AcD7
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/5AcD7
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\System\Traits\Configuration\SupportSystemConfiguration.

Class WFPKSYS\SupportSystem\Models\Configuration\SupportSystemConfiguration:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5AcD7
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/5AcD7
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/5AcD7
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\SupportSystem\Models\Configuration\SupportSystemConfiguration.

Class WFPKSYS\SupportSystem\Models\Foo:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5AcD7
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/5AcD7
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\SupportSystem\Models\Foo.

Class WFPKSYS\SupportSystem\Models\Bar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5AcD7
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/5AcD7
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\SupportSystem\Models\Bar.

Class WFPKSYS\SupportSystem\Models\Fuzz:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5AcD7
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/5AcD7
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%5CSupportSystem%5CModels%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%5CSupportSystem%5CModels%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\SupportSystem\Models\Fuzz.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
208.34 ms | 1403 KiB | 13 Q