3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public $a = 'A'; protected $b = ['a' => 'AA', 'b' => 'BB']; public function __get($v) { echo "$v,"; return $this->b[$v]; } } $a = new A(); echo $a->a . ',' . $a->b;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ETPM
function name:  (null)
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   15     3        FETCH_OBJ_R                                      ~4      !0, 'a'
          4        CONCAT                                           ~5      ~4, '%2C'
          5        FETCH_OBJ_R                                      ~6      !0, 'b'
          6        CONCAT                                           ~7      ~5, ~6
          7        ECHO                                                     ~7
          8      > RETURN                                                   1

Class A:
Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ETPM
function name:  __get
number of ops:  8
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        NOP                                                      
          2        FAST_CONCAT                                      ~1      !0, '%2C'
          3        ECHO                                                     ~1
   10     4        FETCH_OBJ_R                                      ~2      'b'
          5        FETCH_DIM_R                                      ~3      ~2, !0
          6      > RETURN                                                   ~3
   11     7*     > RETURN                                                   null

End of function __get

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.75 ms | 1394 KiB | 13 Q