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("test");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M8BtH
function name:  (null)
number of ops:  9
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        INIT_METHOD_CALL                                             !0, '__test'
          5        SEND_VAL_EX                                                  'test'
          6        DO_FCALL                                          0  $4      
          7        ECHO                                                         $4
          8      > RETURN                                                       1

Class T:
Function __test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M8BtH
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:
161.83 ms | 1967 KiB | 13 Q