3v4l.org

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

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

End of function __get

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.09 ms | 1450 KiB | 14 Q