3v4l.org

run code in 300+ PHP versions simultaneously
<?php phpversion() >= "7.0.0" or die(); class FooBar { private $x; public $y; public function __construct() { var_dump($this); echo "Let's remove a property!", PHP_EOL; unset($this->x); unset($this->y); var_dump($this); echo "Let's add a property!", PHP_EOL; $this->x = 2; $this->y = 3; $this->z = 4; var_dump($this); echo "Where did the private come from?", PHP_EOL; } } $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/7SUvM
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>
   29     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/7SUvM
function name:  __construct
number of ops:  27
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   12     4        ECHO                                                     'Let%27s+remove+a+property%21'
          5        ECHO                                                     '%0A'
   14     6        UNSET_OBJ                                                'x'
   15     7        UNSET_OBJ                                                'y'
   16     8        INIT_FCALL                                               'var_dump'
          9        FETCH_THIS                                       ~2      
         10        SEND_VAL                                                 ~2
         11        DO_ICALL                                                 
   18    12        ECHO                                                     'Let%27s+add+a+property%21'
         13        ECHO                                                     '%0A'
   20    14        ASSIGN_OBJ                                               'x'
         15        OP_DATA                                                  2
   21    16        ASSIGN_OBJ                                               'y'
         17        OP_DATA                                                  3
   22    18        ASSIGN_OBJ                                               'z'
         19        OP_DATA                                                  4
   23    20        INIT_FCALL                                               'var_dump'
         21        FETCH_THIS                                       ~7      
         22        SEND_VAL                                                 ~7
         23        DO_ICALL                                                 
   25    24        ECHO                                                     'Where+did+the+private+come+from%3F'
         25        ECHO                                                     '%0A'
   26    26      > RETURN                                                   null

End of function __construct

End of class FooBar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.33 ms | 1396 KiB | 17 Q