3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { public $a; public ?int $b = 1; function clean() { unset($this->a); unset($this->b); } } $x = new X; $x->clean(); var_dump($x->a); var_dump($x->b); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU2SE
function name:  (null)
number of ops:  14
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   NEW                                                  $1      'X'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   14     3        INIT_METHOD_CALL                                             !0, 'clean'
          4        DO_FCALL                                          0          
   16     5        INIT_FCALL                                                   'var_dump'
          6        FETCH_OBJ_R                                          ~5      !0, 'a'
          7        SEND_VAL                                                     ~5
          8        DO_ICALL                                                     
   17     9        INIT_FCALL                                                   'var_dump'
         10        FETCH_OBJ_R                                          ~7      !0, 'b'
         11        SEND_VAL                                                     ~7
         12        DO_ICALL                                                     
   19    13      > RETURN                                                       1

Class X:
Function clean:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SU2SE
function name:  clean
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   UNSET_OBJ                                                    'a'
    9     1        UNSET_OBJ                                                    'b'
   10     2      > RETURN                                                       null

End of function clean

End of class X.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
163.4 ms | 1496 KiB | 14 Q