3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(strtotime("23/02/2013")); 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/g2hKH
function name:  (null)
number of ops:  23
compiled vars:  !0 = $t, !1 = $t1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'strtotime'
          2        SEND_VAL                                                 '23%2F02%2F2013'
          3        DO_ICALL                                         $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                                 
    3     6      > EXIT                                                     
   33     7*       INIT_STATIC_METHOD_CALL                                  'A', 'getInstance'
          8*       DO_FCALL                                      0  $4      
          9*       ASSIGN                                                   !0, $4
   34    10*       INIT_FCALL                                               'var_dump'
         11*       SEND_VAR                                                 !0
         12*       DO_ICALL                                                 
   36    13*       INIT_STATIC_METHOD_CALL                                  'B', 'getInstance'
         14*       DO_FCALL                                      0  $7      
         15*       ASSIGN                                                   !1, $7
   37    16*       INIT_FCALL                                               'var_dump'
         17*       SEND_VAR                                                 !1
         18*       DO_ICALL                                                 
   39    19*       NEW                                              $10     'B'
         20*       DO_FCALL                                      0          
         21*       FREE                                                     $10
   41    22*     > RETURN                                                   1

Class T:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/g2hKH
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/g2hKH
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/g2hKH
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/g2hKH
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/g2hKH
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/g2hKH
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:
171.14 ms | 1400 KiB | 17 Q