3v4l.org

run code in 500+ PHP versions simultaneously
<?php class X { protected string $foo; public function __isset($name) { echo "DONT YOU SEE THAT THIS IS CALLED THE `FALSE` ISSNT BECAUSE ISSET() WORKS, ITS THE ISSET UNDER THAT LINE WORKS\n"; // return isset($this->foo); // But this doesn't call __isset. Even it is the same like this in line 18. return true; } public function test_isset() { var_dump(isset($this->foo)); // Is false always unset($this->foo); var_dump(isset($this->foo)); // This should be false, but it calls __isset(). } } $x = new X(); var_dump(isset($x->foo)); unset($x->foo); var_dump(isset($x->foo)); (new X())->test_isset();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rmvuk
function name:  (null)
number of ops:  17
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E >   NEW                                                  $1      'X'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   22     3        INIT_FCALL                                                   'var_dump'
          4        ISSET_ISEMPTY_PROP_OBJ                               ~4      !0, 'foo'
          5        SEND_VAL                                                     ~4
          6        DO_ICALL                                                     
   23     7        UNSET_OBJ                                                    !0, 'foo'
   24     8        INIT_FCALL                                                   'var_dump'
          9        ISSET_ISEMPTY_PROP_OBJ                               ~6      !0, 'foo'
         10        SEND_VAL                                                     ~6
         11        DO_ICALL                                                     
   27    12        NEW                                                  $8      'X'
         13        DO_FCALL                                          0          
         14        INIT_METHOD_CALL                                             $8, 'test_isset'
         15        DO_FCALL                                          0          
         16      > RETURN                                                       1

Class X:
Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rmvuk
function name:  __isset
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   RECV                                                 !0      
    9     1        ECHO                                                         'DONT+YOU+SEE+THAT+THIS+IS+CALLED+THE+%60FALSE%60+ISSNT+BECAUSE+ISSET%28%29+WORKS%2C+ITS+THE+ISSET+UNDER+THAT+LINE+WORKS%0A'
   11     2      > RETURN                                                       <true>
   12     3*     > RETURN                                                       null

End of function __isset

Function test_isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Rmvuk
function name:  test_isset
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E >   INIT_FCALL                                                   'var_dump'
          1        ISSET_ISEMPTY_PROP_OBJ                               ~0      'foo'
          2        SEND_VAL                                                     ~0
          3        DO_ICALL                                                     
   17     4        UNSET_OBJ                                                    'foo'
   18     5        INIT_FCALL                                                   'var_dump'
          6        ISSET_ISEMPTY_PROP_OBJ                               ~2      'foo'
          7        SEND_VAL                                                     ~2
          8        DO_ICALL                                                     
   19     9      > RETURN                                                       null

End of function test_isset

End of class X.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
136.03 ms | 1383 KiB | 14 Q