3v4l.org

run code in 500+ PHP versions simultaneously
<?php trait T { public function __get($name) { return $this->$name; } } class Test { use T; private $test = 'I did it'; } echo (new Test)->test;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5p6u3
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   DECLARE_CLASS                                                'test'
   15     1        NEW                                                  $0      'Test'
          2        DO_FCALL                                          0          
          3        FETCH_OBJ_R                                          ~2      $0, 'test'
          4        ECHO                                                         ~2
   16     5      > RETURN                                                       1

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

End of function __get

End of class T.

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
191.92 ms | 1972 KiB | 13 Q