3v4l.org

run code in 500+ PHP versions simultaneously
<?php Class Variables { protected static $_banners=array(); protected static $instance = null; protected function __clone() {} protected static function getInstance($reInit=false) { if(self::$instance==null) { self::$instance = new self(); } if($reInit) {self::$instance = new self();} return self::$instance; } public static function setVar($name='',$value='') { if(!isset(self::${$name})) {return false;} self::${$name}=$value; return true; } } var_dump(Variables::setVar('_banners'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UeKui
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                                   'var_dump'
          1        INIT_STATIC_METHOD_CALL                                      'Variables', 'setVar'
          2        SEND_VAL                                                     '_banners'
          3        DO_FCALL                                          0  $0      
          4        SEND_VAR                                                     $0
          5        DO_ICALL                                                     
          6      > RETURN                                                       1

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

End of function __clone

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
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
Branch analysis from position: 8
filename:       /in/UeKui
function name:  getInstance
number of ops:  16
compiled vars:  !0 = $reInit
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV_INIT                                            !0      <false>
   10     1        FETCH_STATIC_PROP_R              unknown             ~1      'instance'
          2        IS_EQUAL                                                     ~1, null
          3      > JMPZ                                                         ~2, ->8
          4    >   NEW                              self                $4      
          5        DO_FCALL                                          0          
          6        ASSIGN_STATIC_PROP                                           'instance'
          7        OP_DATA                                                      $4
   11     8    > > JMPZ                                                         !0, ->13
          9    >   NEW                              self                $7      
         10        DO_FCALL                                          0          
         11        ASSIGN_STATIC_PROP                                           'instance'
         12        OP_DATA                                                      $7
   12    13    >   FETCH_STATIC_PROP_R              unknown             ~9      'instance'
         14      > RETURN                                                       ~9
   13    15*     > RETURN                                                       null

End of function getinstance

Function setvar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UeKui
function name:  setVar
number of ops:  10
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   RECV_INIT                                            !0      ''
          1        RECV_INIT                                            !1      ''
   15     2        ISSET_ISEMPTY_STATIC_PROP                            ~2      !0
          3        BOOL_NOT                                             ~3      ~2
          4      > JMPZ                                                         ~3, ->6
          5    > > RETURN                                                       <false>
   16     6    >   ASSIGN_STATIC_PROP                                           !0
          7        OP_DATA                                                      !1
   17     8      > RETURN                                                       <true>
   18     9*     > RETURN                                                       null

End of function setvar

End of class Variables.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.18 ms | 482 KiB | 8 Q