3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Envato_Theme_Setup_Wizard { public static $_instance = null; public $theme_name = ''; public $envato_username = ''; public static function instance() { if ( is_null( self::$_instance ) ) { self::$_instance = new self(); self::$_instance->init_globals(); //self::$_instance->init_actions(); } return self::$_instance; } public function init_globals() { $this->theme_name = 'HOBA'; $this->envato_username = 'THEMETEORY'; $this->oauth_script = 'http://themeteory.com/404.php'; } public function get_theme_name(){ return $this->theme_name; } } //var_dump(Envato_Theme_Setup_Wizard::get_theme_name); //$wizard = Envato_Theme_Setup_Wizard::instance(); //var_dump( $wizard->theme_name ); //var_dump( $wizard->envato_username ); //var_dump( $wizard->oauth_script ); //var_dump(Envato_Theme_Setup_Wizard::get_theme_name); class OS_Envato_Theme_Setup_Wizard extends Envato_Theme_Setup_Wizard { public static $_instance = null; public $theme_name = ''; public $envato_username = ''; public function init_globals() { var_dump($this->theme_name); self::theme_name == 'HOBA_EXTENDED'; var_dump($this->theme_name); } } $wizard2 = OS_Envato_Theme_Setup_Wizard::instance(); var_dump( $wizard2::$theme_name ); var_dump( $wizard2::$envato_username ); var_dump( $wizard2::$oauth_script ); var_dump( $wizard2::get_theme_name() );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t4n9g
function name:  (null)
number of ops:  25
compiled vars:  !0 = $wizard2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   INIT_STATIC_METHOD_CALL                                  'OS_Envato_Theme_Setup_Wizard', 'instance'
          1        DO_FCALL                                      0  $1      
          2        ASSIGN                                                   !0, $1
   58     3        INIT_FCALL                                               'var_dump'
          4        FETCH_CLASS                                   0  $3      !0
          5        FETCH_STATIC_PROP_R          unknown             ~4      'theme_name'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
   59     8        INIT_FCALL                                               'var_dump'
          9        FETCH_CLASS                                   0  $6      !0
         10        FETCH_STATIC_PROP_R          unknown             ~7      'envato_username'
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                                 
   60    13        INIT_FCALL                                               'var_dump'
         14        FETCH_CLASS                                   0  $9      !0
         15        FETCH_STATIC_PROP_R          unknown             ~10     'oauth_script'
         16        SEND_VAL                                                 ~10
         17        DO_ICALL                                                 
   62    18        INIT_FCALL                                               'var_dump'
         19        FETCH_CLASS                                   0  $12     !0
         20        INIT_STATIC_METHOD_CALL                                  $12, 'get_theme_name'
         21        DO_FCALL                                      0  $13     
         22        SEND_VAR                                                 $13
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Class Envato_Theme_Setup_Wizard:
Function instance:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/t4n9g
function name:  instance
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      '_instance'
          1        TYPE_CHECK                                    2          ~0
          2      > JMPZ                                                     ~1, ->10
   11     3    >   NEW                          self                $3      
          4        DO_FCALL                                      0          
          5        ASSIGN_STATIC_PROP                                       '_instance'
          6        OP_DATA                                                  $3
   12     7        FETCH_STATIC_PROP_R          unknown             ~5      '_instance'
          8        INIT_METHOD_CALL                                         ~5, 'init_globals'
          9        DO_FCALL                                      0          
   15    10    >   FETCH_STATIC_PROP_R          unknown             ~7      '_instance'
         11      > RETURN                                                   ~7
   16    12*     > RETURN                                                   null

End of function instance

Function init_globals:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t4n9g
function name:  init_globals
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN_OBJ                                               'theme_name'
          1        OP_DATA                                                  'HOBA'
   21     2        ASSIGN_OBJ                                               'envato_username'
          3        OP_DATA                                                  'THEMETEORY'
   22     4        ASSIGN_OBJ                                               'oauth_script'
          5        OP_DATA                                                  'http%3A%2F%2Fthemeteory.com%2F404.php'
   23     6      > RETURN                                                   null

End of function init_globals

Function get_theme_name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t4n9g
function name:  get_theme_name
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   FETCH_OBJ_R                                      ~0      'theme_name'
          1      > RETURN                                                   ~0
   27     2*     > RETURN                                                   null

End of function get_theme_name

End of class Envato_Theme_Setup_Wizard.

Class OS_Envato_Theme_Setup_Wizard:
Function init_globals:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t4n9g
function name:  init_globals
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   47     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_OBJ_R                                      ~0      'theme_name'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   49     4        FETCH_CLASS_CONSTANT                             ~2      'theme_name'
          5        IS_EQUAL                                         ~3      ~2, 'HOBA_EXTENDED'
          6        FREE                                                     ~3
   51     7        INIT_FCALL                                               'var_dump'
          8        FETCH_OBJ_R                                      ~4      'theme_name'
          9        SEND_VAL                                                 ~4
         10        DO_ICALL                                                 
   52    11      > RETURN                                                   null

End of function init_globals

Function instance:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/t4n9g
function name:  instance
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      '_instance'
          1        TYPE_CHECK                                    2          ~0
          2      > JMPZ                                                     ~1, ->10
   11     3    >   NEW                          self                $3      
          4        DO_FCALL                                      0          
          5        ASSIGN_STATIC_PROP                                       '_instance'
          6        OP_DATA                                                  $3
   12     7        FETCH_STATIC_PROP_R          unknown             ~5      '_instance'
          8        INIT_METHOD_CALL                                         ~5, 'init_globals'
          9        DO_FCALL                                      0          
   15    10    >   FETCH_STATIC_PROP_R          unknown             ~7      '_instance'
         11      > RETURN                                                   ~7
   16    12*     > RETURN                                                   null

End of function instance

Function get_theme_name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/t4n9g
function name:  get_theme_name
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   FETCH_OBJ_R                                      ~0      'theme_name'
          1      > RETURN                                                   ~0
   27     2*     > RETURN                                                   null

End of function get_theme_name

End of class OS_Envato_Theme_Setup_Wizard.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.02 ms | 1396 KiB | 15 Q