3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { private $properties = array( '50_day_ma' => 'foo', 'bar' => 'bar', ); public function __get($var) { return $this->properties[$var]; } } $foo = new foo(); echo $foo->bar, "\n"; echo $foo->{'50_day_ma'}, "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0uDYo
function name:  (null)
number of ops:  10
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        FETCH_OBJ_R                                      ~4      !0, 'bar'
          4        ECHO                                                     ~4
          5        ECHO                                                     '%0A'
   16     6        FETCH_OBJ_R                                      ~5      !0, '50_day_ma'
          7        ECHO                                                     ~5
          8        ECHO                                                     '%0A'
          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/0uDYo
function name:  __get
number of ops:  5
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
   10     1        FETCH_OBJ_R                                      ~1      'properties'
          2        FETCH_DIM_R                                      ~2      ~1, !0
          3      > RETURN                                                   ~2
   11     4*     > RETURN                                                   null

End of function __get

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.23 ms | 1393 KiB | 13 Q