3v4l.org

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

Function _get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QR5X8
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 __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 4
Branch analysis from position: 3
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QR5X8
function name:  __construct
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   FETCH_IS                                         ~0      '_GET'
          1        ISSET_ISEMPTY_DIM_OBJ                         0          ~0, 'ryat'
          2      > JMPZ                                                     ~1, ->4
    8     3    > > EXIT                                                     
   11     4    >   FETCH_UNSET                                      $2      '_GET'
          5        UNSET_DIM                                                $2, 'hi'
   12     6      > RETURN                                                   null

End of function __construct

Function __destruct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/QR5X8
function name:  __destruct
number of ops:  18
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   BIND_GLOBAL                                              !0, 'obj'
   16     1        TYPE_CHECK                                  256  ~1      !0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->7
   17     4    >   NEW                                              $3      'cm405'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $3
   19     7    >   INIT_FCALL                                               'var_dump'
          8        FETCH_R                      global              ~6      '_GET'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
   20    11        ROPE_INIT                                     3  ~11     'hi%2C+'
         12        FETCH_R                      global              ~8      '_GET'
         13        FETCH_DIM_R                                      ~9      ~8, 'hi'
         14        ROPE_ADD                                      1  ~11     ~11, ~9
         15        ROPE_END                                      2  ~10     ~11, '%0A'
         16        ECHO                                                     ~10
   21    17      > RETURN                                                   null

End of function __destruct

End of class cm404.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.94 ms | 1392 KiB | 15 Q