3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public function __isset($foo) { return $foo[0] == 'b'; } public function __get($foo) { return $foo == 'bar'; } } $f = new foo; var_dump(empty($f->a)); var_dump(empty($f->b)); var_dump(empty($f->bar));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dEeWd
function name:  (null)
number of ops:  16
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_FCALL                                               'var_dump'
          4        ISSET_ISEMPTY_PROP_OBJ                           ~4      !0, 'a'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                                 
   13     7        INIT_FCALL                                               'var_dump'
          8        ISSET_ISEMPTY_PROP_OBJ                           ~6      !0, 'b'
          9        SEND_VAL                                                 ~6
         10        DO_ICALL                                                 
   14    11        INIT_FCALL                                               'var_dump'
         12        ISSET_ISEMPTY_PROP_OBJ                           ~8      !0, 'bar'
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Class foo:
Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dEeWd
function name:  __isset
number of ops:  5
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        FETCH_DIM_R                                      ~1      !0, 0
          2        IS_EQUAL                                         ~2      ~1, 'b'
          3      > RETURN                                                   ~2
    6     4*     > 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/dEeWd
function name:  __get
number of ops:  4
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        IS_EQUAL                                         ~1      !0, 'bar'
          2      > RETURN                                                   ~1
    9     3*     > RETURN                                                   null

End of function __get

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.46 ms | 1396 KiB | 15 Q