3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cm404 { public $str = ''; function init() { if (isset($GLOBAL['ryat'])) { exit('hi'); } unset($GLOBAL['hi']); } function __destruct() { global $obj; // if(!is_object($obj)) { // $obj = new cm404(); // } echo "hi, $GLOBAL[hi]\n"; var_dump($obj); } } function _get() { // var_dump($obj); } //$_GET['ryat'] = 1; $hi = 'ryat'; $obj = new cm404(); $obj->init(); $hi = 'cm404';
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gvjks
function name:  (null)
number of ops:  8
compiled vars:  !0 = $hi, !1 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   ASSIGN                                                   !0, 'ryat'
   30     1        NEW                                              $3      'cm404'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   31     4        INIT_METHOD_CALL                                         !1, 'init'
          5        DO_FCALL                                      0          
   32     6        ASSIGN                                                   !0, 'cm404'
          7      > RETURN                                                   1

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

End of function _get

Class cm404:
Function init:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gvjks
function name:  init
number of ops:  5
compiled vars:  !0 = $GLOBAL
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'ryat'
          1      > JMPZ                                                     ~1, ->3
    8     2    > > EXIT                                                     'hi'
   11     3    >   UNSET_DIM                                                !0, 'hi'
   12     4      > RETURN                                                   null

End of function init

Function __destruct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Gvjks
function name:  __destruct
number of ops:  10
compiled vars:  !0 = $obj, !1 = $GLOBAL
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   BIND_GLOBAL                                              !0, 'obj'
   19     1        ROPE_INIT                                     3  ~4      'hi%2C+'
          2        FETCH_DIM_R                                      ~2      !1, 'hi'
          3        ROPE_ADD                                      1  ~4      ~4, ~2
          4        ROPE_END                                      2  ~3      ~4, '%0A'
          5        ECHO                                                     ~3
   20     6        INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   21     9      > RETURN                                                   null

End of function __destruct

End of class cm404.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.97 ms | 1401 KiB | 15 Q