3v4l.org

run code in 300+ PHP versions simultaneously
<?php class cm404 { public $str = ''; function __construct() { if (isset($_GET['ryat'])) { exit('fuck'); } unset($_GET['hi']); } function __destruct() { global $obj; if(!is_object($obj)) { echo 1; $obj = new cm404(); } //var_dump($_GET); echo "hi, $_GET[hi]\n"; } } $_GET['ryat'] = 1; $_GET['hi'] = 'ryat'; $_GET['hihi'] = 'hi'; $obj = new cm404(); $_GET['hi'] = 'ryat'; $str = 'O:5:"cm404":1:{s:3:"obj";O:8:"stdClass":0:{}}'; $o = unserialize($str); var_dump($o);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0kETb
function name:  (null)
number of ops:  24
compiled vars:  !0 = $obj, !1 = $str, !2 = $o
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   FETCH_W                      global              $3      '_GET'
          1        ASSIGN_DIM                                               $3, 'ryat'
          2        OP_DATA                                                  1
   26     3        FETCH_W                      global              $5      '_GET'
          4        ASSIGN_DIM                                               $5, 'hi'
          5        OP_DATA                                                  'ryat'
   27     6        FETCH_W                      global              $7      '_GET'
          7        ASSIGN_DIM                                               $7, 'hihi'
          8        OP_DATA                                                  'hi'
   28     9        NEW                                              $9      'cm404'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !0, $9
   29    12        FETCH_W                      global              $12     '_GET'
         13        ASSIGN_DIM                                               $12, 'hi'
         14        OP_DATA                                                  'ryat'
   30    15        ASSIGN                                                   !1, 'O%3A5%3A%22cm404%22%3A1%3A%7Bs%3A3%3A%22obj%22%3BO%3A8%3A%22stdClass%22%3A0%3A%7B%7D%7D'
   31    16        INIT_FCALL                                               'unserialize'
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $15     
         19        ASSIGN                                                   !2, $15
   32    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

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/0kETb
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                                                     'fuck'
   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 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/0kETb
function name:  __destruct
number of ops:  15
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, ->8
   17     4    >   ECHO                                                     1
   18     5        NEW                                              $3      'cm404'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $3
   21     8    >   ROPE_INIT                                     3  ~9      'hi%2C+'
          9        FETCH_R                      global              ~6      '_GET'
         10        FETCH_DIM_R                                      ~7      ~6, 'hi'
         11        ROPE_ADD                                      1  ~9      ~9, ~7
         12        ROPE_END                                      2  ~8      ~9, '%0A'
         13        ECHO                                                     ~8
   22    14      > RETURN                                                   null

End of function __destruct

End of class cm404.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.68 ms | 1400 KiB | 17 Q