3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); // so only PHP 7 will show up class FooBar { private $x; public function __construct() { var_dump($this); unset($this->x); // I can remove a property! var_dump($this); // It's gone! $this->x = 2; // I can recreate a property! var_dump($this); // The "new" property retains the "old" property's visibilty. Good job. } } $foobar = new Foobar;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v6o3t
function name:  (null)
number of ops:  4
compiled vars:  !0 = $foobar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Foobar'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class FooBar:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v6o3t
function name:  __construct
number of ops:  16
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   11     4        UNSET_OBJ                                                'x'
   13     5        INIT_FCALL                                               'var_dump'
          6        FETCH_THIS                                       ~2      
          7        SEND_VAL                                                 ~2
          8        DO_ICALL                                                 
   15     9        ASSIGN_OBJ                                               'x'
         10        OP_DATA                                                  2
   17    11        INIT_FCALL                                               'var_dump'
         12        FETCH_THIS                                       ~5      
         13        SEND_VAL                                                 ~5
         14        DO_ICALL                                                 
   18    15      > RETURN                                                   null

End of function __construct

End of class FooBar.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.37 ms | 1395 KiB | 15 Q