3v4l.org

run code in 300+ PHP versions simultaneously
<?php #[AllowDynamicProperties] class Foo { public function __get( $name ) { return $this->$name; } public function __set( $name, $value ) { return $this->$name = $value; } public function __isset( $name ) { return isset( $this->$name ); } public function __unset( $name ) { unset( $this->$name ); } } $foo = new Foo(); var_dump(property_exists( $foo, 'enable')); $foo->enable = true; var_dump(property_exists( $foo, 'enable'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kLAYu
function name:  (null)
number of ops:  20
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_FCALL                                               'var_dump'
          4        INIT_FCALL                                               'property_exists'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'enable'
          7        DO_ICALL                                         $4      
          8        SEND_VAR                                                 $4
          9        DO_ICALL                                                 
   24    10        ASSIGN_OBJ                                               !0, 'enable'
         11        OP_DATA                                                  <true>
   25    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'property_exists'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'enable'
         16        DO_ICALL                                         $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class Foo:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kLAYu
function name:  __get
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_OBJ_R                                      ~1      !0
          2      > RETURN                                                   ~1
    7     3*     > RETURN                                                   null

End of function __get

Function __set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kLAYu
function name:  __set
number of ops:  6
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   10     2        ASSIGN_OBJ                                       ~2      !0
          3        OP_DATA                                                  !1
          4      > RETURN                                                   ~2
   11     5*     > RETURN                                                   null

End of function __set

Function __isset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kLAYu
function name:  __isset
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   RECV                                             !0      
   14     1        ISSET_ISEMPTY_PROP_OBJ                           ~1      !0
          2      > RETURN                                                   ~1
   15     3*     > RETURN                                                   null

End of function __isset

Function __unset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kLAYu
function name:  __unset
number of ops:  3
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   RECV                                             !0      
   18     1        UNSET_OBJ                                                !0
   19     2      > RETURN                                                   null

End of function __unset

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.22 ms | 1465 KiB | 15 Q