3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { public int $a; public int $b; public int $c; public function __isset($name) { var_dump('Called for' .$name); return false; } } $x = new X; $x->a = 2; $x->b = 2; //I am deliberately not setting a value for "c" var_dump($x); var_dump(isset($x->a)); unset($x->a); var_dump($x); var_dump(isset($x->a)); // So why it's called now, since it's the same state?
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QDGi3
function name:  (null)
number of ops:  23
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   NEW                                                  $1      'X'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   15     3        ASSIGN_OBJ                                                   !0, 'a'
          4        OP_DATA                                                      2
   16     5        ASSIGN_OBJ                                                   !0, 'b'
          6        OP_DATA                                                      2
   19     7        INIT_FCALL                                                   'var_dump'
          8        SEND_VAR                                                     !0
          9        DO_ICALL                                                     
   20    10        INIT_FCALL                                                   'var_dump'
         11        ISSET_ISEMPTY_PROP_OBJ                               ~7      !0, 'a'
         12        SEND_VAL                                                     ~7
         13        DO_ICALL                                                     
   22    14        UNSET_OBJ                                                    !0, 'a'
   24    15        INIT_FCALL                                                   'var_dump'
         16        SEND_VAR                                                     !0
         17        DO_ICALL                                                     
   25    18        INIT_FCALL                                                   'var_dump'
         19        ISSET_ISEMPTY_PROP_OBJ                               ~10     !0, 'a'
         20        SEND_VAL                                                     ~10
         21        DO_ICALL                                                     
         22      > RETURN                                                       1

Class X:
Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QDGi3
function name:  __isset
number of ops:  7
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    8     0  E >   RECV                                                 !0      
    9     1        INIT_FCALL                                                   'var_dump'
          2        CONCAT                                               ~1      'Called+for', !0
          3        SEND_VAL                                                     ~1
          4        DO_ICALL                                                     
   10     5      > RETURN                                                       <false>
   11     6*     > RETURN                                                       null

End of function __isset

End of class X.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.01 ms | 1369 KiB | 14 Q