3v4l.org

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

Class T:
Function __test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/97X3q
function name:  __test
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 __test

End of class T.

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
170.08 ms | 2015 KiB | 13 Q