3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Common\Interfaces; interface Locale { const RU = 'ru_RU'; const EN = 'en_EN'; } var_dump(Common\Interfaces\Locale::RU); die; abstract class T { static public $instanses; final private function __construct(){ } public static function getInstance() { if (!(static::$instanses instanceof static)) { static::$instanses = new static; } return static::$instanses; } } class A extends T { static public $instanses; } class B extends A { static public $instanses; } $t = A::getInstance(); var_dump($t); $t1 = B::getInstance(); var_dump($t1); new B(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/0bb9A
function name:  (null)
number of ops:  21
compiled vars:  !0 = $t, !1 = $t1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_NS_FCALL_BY_NAME                                    'Common%5CInterfaces%5Cvar_dump'
          1        FETCH_CLASS_CONSTANT                             ~2      'Common%5CInterfaces%5CCommon%5CInterfaces%5CLocale', 'RU'
          2        SEND_VAL_EX                                              ~2
          3        DO_FCALL                                      0          
    9     4      > EXIT                                                     
   39     5*       INIT_STATIC_METHOD_CALL                                  'Common%5CInterfaces%5CA', 'getInstance'
          6*       DO_FCALL                                      0  $4      
          7*       ASSIGN                                                   !0, $4
   40     8*       INIT_NS_FCALL_BY_NAME                                    'Common%5CInterfaces%5Cvar_dump'
          9*       SEND_VAR_EX                                              !0
         10*       DO_FCALL                                      0          
   42    11*       INIT_STATIC_METHOD_CALL                                  'Common%5CInterfaces%5CB', 'getInstance'
         12*       DO_FCALL                                      0  $7      
         13*       ASSIGN                                                   !1, $7
   43    14*       INIT_NS_FCALL_BY_NAME                                    'Common%5CInterfaces%5Cvar_dump'
         15*       SEND_VAR_EX                                              !1
         16*       DO_FCALL                                      0          
   45    17*       NEW                                              $10     'Common%5CInterfaces%5CB'
         18*       DO_FCALL                                      0          
         19*       FREE                                                     $10
   47    20*     > RETURN                                                   1

Class Common\Interfaces\Locale: [no user functions]
Class Common\Interfaces\T:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0bb9A
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   null

End of function __construct

Function getinstance:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/0bb9A
function name:  getInstance
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'instanses'
          1        INSTANCEOF                                       ~1      ~0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
   22     4    >   NEW                          static              $4      
          5        DO_FCALL                                      0          
          6        ASSIGN_STATIC_PROP                                       'instanses'
          7        OP_DATA                                                  $4
   25     8    >   FETCH_STATIC_PROP_R          unknown             ~6      'instanses'
          9      > RETURN                                                   ~6
   26    10*     > RETURN                                                   null

End of function getinstance

End of class Common\Interfaces\T.

Class Common\Interfaces\A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0bb9A
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   null

End of function __construct

Function getinstance:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/0bb9A
function name:  getInstance
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'instanses'
          1        INSTANCEOF                                       ~1      ~0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
   22     4    >   NEW                          static              $4      
          5        DO_FCALL                                      0          
          6        ASSIGN_STATIC_PROP                                       'instanses'
          7        OP_DATA                                                  $4
   25     8    >   FETCH_STATIC_PROP_R          unknown             ~6      'instanses'
          9      > RETURN                                                   ~6
   26    10*     > RETURN                                                   null

End of function getinstance

End of class Common\Interfaces\A.

Class Common\Interfaces\B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0bb9A
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E > > RETURN                                                   null

End of function __construct

Function getinstance:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/0bb9A
function name:  getInstance
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'instanses'
          1        INSTANCEOF                                       ~1      ~0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
   22     4    >   NEW                          static              $4      
          5        DO_FCALL                                      0          
          6        ASSIGN_STATIC_PROP                                       'instanses'
          7        OP_DATA                                                  $4
   25     8    >   FETCH_STATIC_PROP_R          unknown             ~6      'instanses'
          9      > RETURN                                                   ~6
   26    10*     > RETURN                                                   null

End of function getinstance

End of class Common\Interfaces\B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.15 ms | 1404 KiB | 15 Q