3v4l.org

run code in 300+ PHP versions simultaneously
<?php phpversion() >= "7.0.0" or die(); class FooBar { private $x; public function __construct() { echo "Let's remove a property!", PHP_EOL; unset($this->x); var_dump($this); var_dump(property_exists($this, 'x')); $this->x = 1; $this->y = 2; var_dump($this); } } $foobar = new Foobar;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tXJDn
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foobar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'phpversion'
          1        DO_ICALL                                         $1      
          2        IS_SMALLER_OR_EQUAL                              ~2      '7.0.0', $1
          3      > JMPNZ_EX                                         ~2      ~2, ->6
          4    > > EXIT                                                     
          5*       BOOL                                             ~2      <true>
   21     6    >   NEW                                              $3      'Foobar'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !0, $3
          9      > RETURN                                                   1

Class FooBar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tXJDn
function name:  __construct
number of ops:  24
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ECHO                                                     'Let%27s+remove+a+property%21'
          1        ECHO                                                     '%0A'
   12     2        UNSET_OBJ                                                'x'
   13     3        INIT_FCALL                                               'var_dump'
          4        FETCH_THIS                                       ~0      
          5        SEND_VAL                                                 ~0
          6        DO_ICALL                                                 
   14     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'property_exists'
          9        FETCH_THIS                                       ~2      
         10        SEND_VAL                                                 ~2
         11        SEND_VAL                                                 'x'
         12        DO_ICALL                                         $3      
         13        SEND_VAR                                                 $3
         14        DO_ICALL                                                 
   15    15        ASSIGN_OBJ                                               'x'
         16        OP_DATA                                                  1
   16    17        ASSIGN_OBJ                                               'y'
         18        OP_DATA                                                  2
   17    19        INIT_FCALL                                               'var_dump'
         20        FETCH_THIS                                       ~7      
         21        SEND_VAL                                                 ~7
         22        DO_ICALL                                                 
   18    23      > RETURN                                                   null

End of function __construct

End of class FooBar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.36 ms | 1396 KiB | 19 Q