3v4l.org

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

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

End of function __get

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.09 ms | 1384 KiB | 13 Q