3v4l.org

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

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

End of function __get

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.11 ms | 1399 KiB | 15 Q