3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { protected $a = 'ciao'; public function salute() { $a = 'a'; echo $this->$a; } public function __get($name) { var_dump($name); return $this->$name; } } $test = new test(); $test->salute();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cVQ8b
function name:  (null)
number of ops:  6
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $1      'test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   20     3        INIT_METHOD_CALL                                         !0, 'salute'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class test:
Function salute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cVQ8b
function name:  salute
number of ops:  4
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'a'
    9     1        FETCH_OBJ_R                                      ~2      !0
          2        ECHO                                                     ~2
   10     3      > RETURN                                                   null

End of function salute

Function __get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cVQ8b
function name:  __get
number of ops:  7
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
   15     4        FETCH_OBJ_R                                      ~2      !0
          5      > RETURN                                                   ~2
   16     6*     > RETURN                                                   null

End of function __get

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.16 ms | 1395 KiB | 15 Q