3v4l.org

run code in 500+ PHP versions simultaneously
<?php class myClass { private $var = null; function __construct() { $this->var = "Hello"; } public function func() { $this->var = null; var_dump($this->var);// Does nothing, still "Hello" unset($this->var); var_dump($this->var);// Does nothing, still "Hello" $this->var = false; var_dump($this->var);// Works and prints "Hello" } } $c = new myClass; $c->func();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/POdHF
function name:  (null)
number of ops:  6
compiled vars:  !0 = $c
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   NEW                                                  $1      'myClass'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   22     3        INIT_METHOD_CALL                                             !0, 'func'
          4        DO_FCALL                                          0          
          5      > RETURN                                                       1

Class myClass:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/POdHF
function name:  __construct
number of ops:  3
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN_OBJ                                                   'var'
          1        OP_DATA                                                      'Hello'
    8     2      > RETURN                                                       null

End of function __construct

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

End of function func

End of class myClass.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
221.56 ms | 2043 KiB | 14 Q