3v4l.org

run code in 500+ PHP versions simultaneously
<?php class x { private array $config = array(); function __isset($name) { print __METHOD__." ".$name.PHP_EOL; return isset($this->config[$name]); } function __get($name) { print __METHOD__." ".$name.PHP_EOL; return 'a'; } } $x = new x; var_dump(isset($x->a)); var_dump(empty($x->a));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Eiumt
function name:  (null)
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   19     0  E >   NEW                                                  $1      'x'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
   20     3        INIT_FCALL                                                   'var_dump'
          4        ISSET_ISEMPTY_PROP_OBJ                               ~4      !0, 'a'
          5        SEND_VAL                                                     ~4
          6        DO_ICALL                                                     
   21     7        INIT_FCALL                                                   'var_dump'
          8        ISSET_ISEMPTY_PROP_OBJ                               ~6      !0, 'a'
          9        SEND_VAL                                                     ~6
         10        DO_ICALL                                                     
         11      > RETURN                                                       1

Class x:
Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Eiumt
function name:  __isset
number of ops:  8
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
    7     1        CONCAT                                               ~1      'x%3A%3A__isset+', !0
          2        CONCAT                                               ~2      ~1, '%0A'
          3        ECHO                                                         ~2
    8     4        FETCH_OBJ_IS                                         ~3      'config'
          5        ISSET_ISEMPTY_DIM_OBJ                             0  ~4      ~3, !0
          6      > RETURN                                                       ~4
    9     7*     > RETURN                                                       null

End of function __isset

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Eiumt
function name:  __get
number of ops:  6
compiled vars:  !0 = $name
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   11     0  E >   RECV                                                 !0      
   12     1        CONCAT                                               ~1      'x%3A%3A__get+', !0
          2        CONCAT                                               ~2      ~1, '%0A'
          3        ECHO                                                         ~2
   13     4      > RETURN                                                       'a'
   14     5*     > RETURN                                                       null

End of function __get

End of class x.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
192.57 ms | 3417 KiB | 14 Q