3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(unserialize('a:3:{i:0;s:23:"i.petretskiy@netrika.ru";i:1;s:22:"pochta@test.netrika.ru";i:2;s:22:"i.razdymaho@netrika.ru";}')); 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 = 62) Position 1 = -2
filename:       /in/Ivjj0
function name:  (null)
number of ops:  22
compiled vars:  !0 = $t, !1 = $t1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'unserialize'
          2        SEND_VAL                                                 'a%3A3%3A%7Bi%3A0%3Bs%3A23%3A%22i.petretskiy%40netrika.ru%22%3Bi%3A1%3Bs%3A22%3A%22pochta%40test.netrika.ru%22%3Bi%3A2%3Bs%3A22%3A%22i.razdymaho%40netrika.ru%22%3B%7D'
          3        DO_ICALL                                         $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                                 
   33     6        INIT_STATIC_METHOD_CALL                                  'A', 'getInstance'
          7        DO_FCALL                                      0  $4      
          8        ASSIGN                                                   !0, $4
   34     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   36    12        INIT_STATIC_METHOD_CALL                                  'B', 'getInstance'
         13        DO_FCALL                                      0  $7      
         14        ASSIGN                                                   !1, $7
   37    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                                 
   39    18        NEW                                              $10     'B'
         19        DO_FCALL                                      0          
         20        FREE                                                     $10
   44    21      > RETURN                                                   1

Class T:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ivjj0
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     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/Ivjj0
function name:  getInstance
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'instanses'
          1        INSTANCEOF                                       ~1      ~0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
   16     4    >   NEW                          static              $4      
          5        DO_FCALL                                      0          
          6        ASSIGN_STATIC_PROP                                       'instanses'
          7        OP_DATA                                                  $4
   19     8    >   FETCH_STATIC_PROP_R          unknown             ~6      'instanses'
          9      > RETURN                                                   ~6
   20    10*     > RETURN                                                   null

End of function getinstance

End of class T.

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ivjj0
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     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/Ivjj0
function name:  getInstance
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'instanses'
          1        INSTANCEOF                                       ~1      ~0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
   16     4    >   NEW                          static              $4      
          5        DO_FCALL                                      0          
          6        ASSIGN_STATIC_PROP                                       'instanses'
          7        OP_DATA                                                  $4
   19     8    >   FETCH_STATIC_PROP_R          unknown             ~6      'instanses'
          9      > RETURN                                                   ~6
   20    10*     > RETURN                                                   null

End of function getinstance

End of class A.

Class B:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ivjj0
function name:  __construct
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     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/Ivjj0
function name:  getInstance
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   FETCH_STATIC_PROP_R          unknown             ~0      'instanses'
          1        INSTANCEOF                                       ~1      ~0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
   16     4    >   NEW                          static              $4      
          5        DO_FCALL                                      0          
          6        ASSIGN_STATIC_PROP                                       'instanses'
          7        OP_DATA                                                  $4
   19     8    >   FETCH_STATIC_PROP_R          unknown             ~6      'instanses'
          9      > RETURN                                                   ~6
   20    10*     > RETURN                                                   null

End of function getinstance

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.16 ms | 1409 KiB | 17 Q