3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Singltone{ static $instanse; private function __construct(){ } private function __clone(){} public static function getInstanse(){ if(is_null(self::$instanse)) { self::$instanse = new self; } return self::$instanse; } } $sngl = Singltone::getInstanse(); $clone = clone $sngl;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R3rVG
function name:  (null)
number of ops:  6
compiled vars:  !0 = $sngl, !1 = $clone
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   INIT_STATIC_METHOD_CALL                                  'Singltone', 'getInstanse'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   17     3        CLONE                                            ~4      !0
          4        ASSIGN                                                   !1, ~4
          5      > RETURN                                                   1

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

End of function __construct

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

End of function __clone

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

End of function getinstanse

End of class Singltone.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.46 ms | 1395 KiB | 13 Q