3v4l.org

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

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

End of function __get

End of class Magic.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.15 ms | 1395 KiB | 13 Q